Notepad/enter/Coding Tips (Classical)/Terminal Tips/Languages/Python/tools/Libraries/pandas/common pandas commands.md

934 B

Common SQL queries in pandas

Pandas is a way to transform dataframes with the datasets you have so you have got to be comfortable using it. Make sure to import pandas and seaborn. Here are some popular commands. This website was useful for learning about that

  • Import packages and load the data
# Import packages 
import pandas as pd
import seaborn as sns 

# Import data
tips = sns.load_dataset('tips')
  • View top 5 records in the dataset
tips.head()

# specify the amount by placing number inside
# the default is 5 

tips.head(8)

!Pasted image 20220705203711.png

  • Filter data
  • Sort data
  • Aggregate data
  • Aggregate data by group

More useful data science tutorials: