Pandas
littlehaes
这个作者很懒,什么都没留下…
展开
-
pandas 遍历DataFrame
使用df.iterrows()获取可迭代对象, 然后使用for循环遍历即可for index, row in df.iterrows(): print(index, row)原创 2020-07-19 22:35:36 · 586 阅读 · 0 评论 -
pandas 两个DataFrame作差
df3 = df1.append(df2).drop_duplicates(keep=False)keep=False表示丢弃所有的重复项参考原创 2020-07-19 22:32:25 · 6146 阅读 · 1 评论 -
pandas报错: Unable to find a usable engine
报错信息"Unable to find a usable engine; "ImportError: Unable to find a usable engine; tried using: 'pyarrow', 'fastparquet'.pyarrow or fastparquet is required for parquet support解决方法 pip install pyarrow也可以执行pip install fastparquet...原创 2020-07-06 14:21:04 · 2909 阅读 · 0 评论 -
pandas df.loc df.iloc 区别
welcome to my blogdf.loc是通过名字访问行或者列df.iloc是通过索引访问行或者列, 所以df.iloc只能跟整数举个例子import numpy as npimport pandas as pds = pd.Series(data=np.nan, index=[49, 48, 47, 46, 45, 1, 2, 3, 4, 5])s'''49 NaN...原创 2020-01-26 23:06:23 · 2485 阅读 · 0 评论