My Top 10 Most Frequently Used Python Panda Code

  1. Export DF to excel
df = pd.read_excel(r'/Users/user/Downloads/excel1.xlsx')
df.sort_values('column1', ascending=False).head()
df[df['column1'].str.contains("winter", na=False)]
df.drop(columns=['column1', 'column2], inplace=True)
df[df.bodylength >= 50]
df_new = df[['column1', 'column2', 'column3']]



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
David K. Kim

David K. Kim

Programming enthusiast who loves to learn