Skip to content

Commit 50ca17c

Browse files
committed
Added improvements to the cheat sheet based on issue pandas-dev#40680
1 parent 1be2637 commit 50ca17c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/path/to/cheat_sheet.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})
2+
df.plot(kind='bar')
3+
pd.set_option('display.max_rows', 10) # Display up to 10 rows
4+
# Read CSV
5+
df = pd.read_csv('data.csv')
6+
# Write to Excel
7+
df.to_excel('output.xlsx', index=False)
8+
df['A_squared'] = df['A'].apply(lambda x: x**2)
9+
s = pd.Series([1, 2, pd.NA], dtype="Int64")

0 commit comments

Comments
 (0)