Last active
October 21, 2022 11:11
-
-
Save datagy/e95dcc9792358c301438ae6267c2a549 to your computer and use it in GitHub Desktop.
Loading a Sample Pandas DataFrame
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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