-1

How to calculate data distribution (variance and standard deviation) on Python 3, if the data has > given with atribute Jumlah_individu?

this is my code to calculate mean (I have get it) but for varience and standard deviation i cann't

2
  • Please post your code, not an image of the code. Also we need to know what data is: a pandas dataframe? numpy ndarray? list-of-lists? Please show data.info() Commented Oct 3, 2018 at 0:50
  • Ok it's pandas since you reference the column by data.jumlah_individu Commented Oct 3, 2018 at 17:00

1 Answer 1

1

Python has a statistics module. Maybe that'll be helpful.

>>> import statistics as stats
>>> alist = [1,2,3,4,5,6,2,2,2]
>>> stats.median(alist)
2
>>> stats.mode(alist)
2
>>> stats.mean(alist)
3
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.