Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
423 views
in Technique[技术] by (71.8m points)

python - 如何获取熊猫的多个指数的平均值(How to get the average of a number of indices in pandas)

I'm looking at the suicide DF ( https://mc.ai/studying-suicide-rates-from-1985-to-2016-prediction-using-machine-learning/ ) and I want to reshape the DF to just have one line per country.

(我正在查看自杀DF( https://mc.ai/studying-suicide-rates-from-1985-to-2016-prediction-using-machine-learning/ ),我想重塑DF以使其具有每个国家一线。)

I can add all of the ints (suicides per year) but I need to average out some of the other values, ie GDP/year, GDP per capita etc. Any suggestions?

(我可以将所有整数(每年的自杀数)相加,但我需要对其他一些值取平均值,即GDP /年,人均GDP等。有什么建议吗?)

  ask by Peadar08 translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...