读写文件

Pandas基础

Pandas基础
Pandas基础
Pandas基础

Pandas基础
Pandas基础

基本数据结构

Series

Pandas基础
Pandas基础
Pandas基础
Pandas基础

DataFrame

Pandas基础
Pandas基础
Pandas基础
Pandas基础
Pandas基础
Pandas基础
Pandas基础
Pandas基础

常用函数

head和tail

df.head()
df.tail()

unique和nunique

count和value_counts

describe和info

idxmax和nlargest

clip和replace

apply函数

排序

索引排序

df.set_index(‘Math’).head() #set_index函数可以设置索引;
df.set_index(‘Math’).sort_index().head() #可以设置ascending参数,默认为升序,True

值排序

df.sort_values(by=‘Class’).head();
多个值排序,即先对第一层排,在第一层相同的情况下对第二层排序
df.sort_values(by=[‘Address’,‘Height’]).head()

相关文章:

  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-02
猜你喜欢
  • 2021-04-11
  • 2021-10-11
  • 2022-02-07
  • 2021-05-22
相关资源
相似解决方案