pandas
code_tailor
这个作者很懒,什么都没留下…
展开
-
Seaborn | Distribution Plots
https://www.geeksforgeeks.org/seaborn-distribution-plots/?ref=gcseDifficulty Level : MediumLast Updated : 26 Aug, 2019Seaborn is a Python data visualization library based on Matplotlib. It provides a high-level interface for drawing attractive and infor原创 2022-03-18 21:40:04 · 343 阅读 · 0 评论 -
Histograms
https://mode.com/example-gallery/python_histogram/原创 2022-03-18 10:54:41 · 78 阅读 · 0 评论 -
Working with excel files using Pandas
https://www.geeksforgeeks.org/working-with-excel-files-using-pandas/原创 2022-03-09 16:32:53 · 605 阅读 · 0 评论 -
DataFrame 修改列名
先建立一个DataFrameimport pandas as pda = pd.DataFrame({‘A’:[1,2,3], ‘B’:[4,5,6], ‘C’:[7,8,9]})aA B C0 1 4 71 2 5 82 3 6 9方法一:直接赋值a.columns = [‘a’,‘b’,‘c’]aa b c0 1 4 71 2 5 82 3 6 9一次要更新所有的列名方法二:字典映射a.rename(co原创 2022-03-04 10:20:14 · 934 阅读 · 0 评论 -
熊猫 分组
import pandas as pdimport numpy as npgroup by : split apply combinedic_gpa = {‘class’:[‘A’,‘B’,‘A’,‘B’],‘sname’:[‘tom’,‘kite’,‘tom’,‘hanmeimei’],‘math’:(np.random.rand(4)*100).round(),‘english’:(np.random.rand(4)*100).round()}df = pd.DataFrame(dic_原创 2022-03-02 17:22:28 · 832 阅读 · 0 评论 -
pandas errors Pattern matched multiple keys
Set some Pandas options as you likeold version#pd.set_option(‘max_columns’, 40)#pd.set_option(‘max_rows’, 30)new versionpd.options.display.max_rows=30pd.options.display.max_columns=40原创 2022-03-02 10:36:40 · 2037 阅读 · 0 评论