Pandas学习笔记

1.groupby的用法

参考:https://zhuanlan.zhihu.com/p/101284491

2.Pandas中的map(), apply()和applymap()的应用

参考:https://blog.csdn.net/maymay_/article/details/80229053

3.Pandas中read_excel()的用法

参考:https://blog.csdn.net/leenuxcore/article/details/106407522

4.Python format 格式化函数

参考:https://www.runoob.com/python/att-string-format.html

5.Python 分组

参看:https://blog.csdn.net/qq_41892229/article/details/109702038

6.Python agg自定义分组

参考:https://www.cnpython.com/qa/449702

7.Python 窗口函数

参考1:https://blog.csdn.net/S_o_l_o_n/article/details/88428184
参考2:https://codingdict.com/article/8287
参考文档:https://pandas.pydata.org/pandas-docs/stable/reference/window.html

8.DataFrame转换成字典

参考: https://blog.csdn.net/weixin_42081390/article/details/121486034

9.Pandas教程

参考: http://c.biancheng.net/pandas/

10.计算IRR

参考: https://qa.1r1g.com/sf/ask/3234261481/

11.partial函数

参考:https://blog.csdn.net/qq_33688922/article/details/91890142

12.query函数

参考:https://blog.csdn.net/AlanGuoo/article/details/88874742
笔记:

### 1. 检索不为空的行
df.query("columnName.notnull()")
### 2. 检索为空的行
df.query("column.isnull()")

13.计算增长率

参考:https://blog.csdn.net/weixin_46023346/article/details/123465063

14.数据长宽转换

参考:https://blog.csdn.net/jhr112/article/details/115914407

15.增加列

参考:https://blog.csdn.net/LHJCSDNYL/article/details/124577994

16.排序

参考:https://blog.csdn.net/weixin_45144170/article/details/106305532

17.类型转换

参考:https://blog.csdn.net/ljh18885466426/article/details/120026408

18.计算分位数

参考:https://blog.csdn.net/dair6/article/details/121352283

19.缺失值处理

参考:https://m.w3cschool.cn/article/54814732.html

20.数据更新

参考:https://blog.csdn.net/weixin_39854070/article/details/111075862

21.统计函数 describe

参考:https://blog.csdn.net/sala_lxw/article/details/104500381

22.删除空行

参考:https://blog.csdn.net/qq_27560539/article/details/118540701

23.和sqlsqlchemy交互使用

参考:https://geek-docs.com/pandas/pandas-tutorials/connecting-pandas-to-a-database-with-sqlalchemy.html
官方:https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_sql.html?highlight=sqlalchemy

24. 索引列转日期

df.index = pd.to_datetime(df.index)

25. 字典转DataFrame

参考:https://blog.csdn.net/qq_38230663/article/details/117134821

posted on   朝朝暮Mu  阅读(59)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· winform 绘制太阳,地球,月球 运作规律
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示