Python下Pandas的14个最佳特色功能_图文.doc
文本预览下载声明
Python下Pandas的14个最佳特色功能_图文
导读:就爱阅读网友为您分享以下“Python下Pandas的14个最佳特色功能_图文”的资讯,希望对您有所帮助,感谢您对92的支持!
You can also calculate standard deviation of the region_groupby using olive_oil.groupby(?region?).std()
11) Aggregate function
Aggregate function takes a function as an argument and applies the function to columns in the groupby sub dataframe. I am applying np.mean(computes mean) on all three regions.
12) Join
I am renaming ol mean and olstd columns.
In[ 34]: list_of_acids =[?palmitic?, ?palmitoleic?, ?stearic?, ?oleic?, ?linoleic?, ?linolenic?, ?arachidic?, ?eicosenoic?]
Pandas can do general merges. When we do that along an index, it?s called a join. Here I make two sub-data frames and join them on the common region index.
显示全部