Skip to content

Commit

Permalink
Added improvements to the cheat sheet based on issue pandas-dev#40680
Browse files Browse the repository at this point in the history
  • Loading branch information
deveshbervar committed Jan 4, 2025
1 parent 1be2637 commit 50ca17c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/path/to/cheat_sheet.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})
df.plot(kind='bar')
pd.set_option('display.max_rows', 10) # Display up to 10 rows
# Read CSV
df = pd.read_csv('data.csv')
# Write to Excel
df.to_excel('output.xlsx', index=False)
df['A_squared'] = df['A'].apply(lambda x: x**2)
s = pd.Series([1, 2, pd.NA], dtype="Int64")

0 comments on commit 50ca17c

Please sign in to comment.