import pandas as pdPandas: Data Loading
pandas
dataframe
Understanding how to use the Pandas library to load data from CSV and Excel files.
Pandas is a powerful Python library for data analysis and manipulation. It provides easy-to-use data structures and functions for working with structured data.
In this notebook, you will learn how to:
- Import the Pandas library
- Load data from a CSV file
- Load data from an Excel file
- View the loaded data
df_csv = pd.read_csv('example.csv')
df_csv| Name | Age | City | |
|---|---|---|---|
| 0 | Adil | 23 | Matannur |
| 1 | Aman | 19 | Vellore |
| 2 | Ziya | 15 | Tly |
| 3 | Zahra | 9 | Knr |
df_xl = pd.read_excel('example.xlsx')
df_xl| Name | Age | City | |
|---|---|---|---|
| 0 | Adil | 23 | Matannur |
| 1 | Aman | 19 | Vellore |
| 2 | Ziya | 15 | Tly |
| 3 | Zahra | 9 | Knr |