BetterDocs
Home
Docs

Pandas | Installation

Installation

Assuming you have installed Python & pip or conda, go ahead and run the below command to install pandas:
D:\FolderName\Pandas> pip install pandas

Importing & Aliasing

Upon installing, proceed importing pandas and aliasing to pd for easier usage:
import pandas as pd

as: In Python, an alias is created to refer the same thing in an easier way.

Creating DataFrame

Voila! You're all set to create your first dataframe:
import pandas as pd

# Create a DataFrame with some sample data
data = {
    'Name': ['NumPy', 'Pandas', 'Matplotlib'],
    'Count': [0, 1, 2],
    'Remarks': ['Better', 'Docs', '#justbetter']
}
df = pd.DataFrame(data)
print(df)
'''
Output:
|index|Name      |Count|Remarks    |
|-----|----------|-----|-----------|
|0    |NumPy     |0    |Better     |
|1    |Pandas    |1    |Docs       |
|2    |Matplotlib|2    |#justbetter|
'''

Logo

BetterDocs

Support

EmailDiscordForms

Documentations

Python

Company

AboutDocs

Policies

Terms of ServicePrivacy Policy