Skip to content

Instantly share code, notes, and snippets.

@iguoli
Last active December 4, 2017 07:40
Show Gist options
  • Save iguoli/96f5337e35880903a07fbe87a73d013d to your computer and use it in GitHub Desktop.
Save iguoli/96f5337e35880903a07fbe87a73d013d to your computer and use it in GitHub Desktop.
Pandas学习笔记,python, pandas, analysis

设置pandas显示的最大高度、宽度、行数及列数

import pandas as pd


pd.set_option('display.height', 1000)
pd.set_option('display.width', 1000)
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 10)

Pandas中为DataFrame增加一行

import pandas as pd

df = pd.DataFrame({'one': np.arange(4), 'two': np.arange(4)})
df.append([{'one': 5, 'two': 6}, {'two': 8, 'one': 9}], ignore_index=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment