yymor

让我们开始数据分析


Pandas

pandas: 功能强大的Python数据分析工具包

  • 软件包概述
  • 10分钟入门pandas
    • s = pd.Series([1,3,5,np.nan,6,8]) : Series对象
    • dates = pd.date_range(\'20130101\', periods=6) : 生成时间
    • df = pd.DataFrame(np.random.randn(6,4), index=dates, columns=list(\'ABCD\')):生成DataFrame 对象
    • df.[方法,属性: dtypes, head(), index, columns, describe(), T, sort_index(axis=1, ascending=False), sort_values(by=\'B\'), ]
    • 切片方式, 标签选择: [df[0:3], df.loc[dates[0]], df.loc[:,[\'A\',\'B\']], df.loc[dates[0],\'A\'], df.at[dates[0],\'A\'], df.iloc[3:5,0:2], df.iat[1,1], df[df.A > 0], ]
    • 过滤:[df2[df2[\'E\'].isin([\'two\',\'four\'])], ]
    • 缺失数据[df1.dropna(how=\'any\'), df1.fillna(value=5), pd.isna(df1)]
    • 基础操作[mean(), shift(2)]

numpy

matplotlib

分类:

技术点:

相关文章:

  • 2021-12-24
  • 2022-02-25
  • 2022-12-23
  • 2021-08-23
  • 2021-12-14
  • 2021-05-10
  • 2022-01-22
  • 2022-12-23
猜你喜欢
  • 2021-11-26
  • 2022-02-28
  • 2021-12-16
  • 2021-11-08
  • 2022-01-22
  • 2021-07-11
  • 2021-11-04
相关资源
相似解决方案