Skip to content

Instantly share code, notes, and snippets.

@datagy
Last active October 21, 2022 11:11
Show Gist options
  • Select an option

  • Save datagy/e95dcc9792358c301438ae6267c2a549 to your computer and use it in GitHub Desktop.

Select an option

Save datagy/e95dcc9792358c301438ae6267c2a549 to your computer and use it in GitHub Desktop.
Loading a Sample Pandas DataFrame
# Loading a Sample Pandas DataFrame
import pandas as pd
df = pd.DataFrame({
'Name': ['Nik', 'Kate', 'Evan'],
'Location': ['Toronto, ON', 'Atlanta, GA', 'Portland, OR'],
'Total': [99.99, 125.65, 33.43]
})
print(df)
# Returns:
# Name Location Total
# 0 Nik Toronto, ON 99.99
# 1 Kate Atlanta, GA 125.65
# 2 Evan Portland, OR 33.43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment