</>
Skip to content
Pandas lessons (3/42)

Pandas — Get Started

First Pandas program

import pandas as pd

# Create DataFrame
data = {
    'name': ['Alice', 'Bob', 'Charlie'],
    'age': [25, 30, 35],
    'city': ['NYC', 'LA', 'Chicago']
}

df = pd.DataFrame(data)
print(df)

Basic operations

# View data
print(df.head())
print(df.info())
print(df.describe())

# Select column
print(df['name'])

# Filter
print(df[df['age'] > 25])

Loading data

# From CSV
df = pd.read_csv('data.csv')

# From dictionary
df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})

# From list
df = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B'])

Mini Practice

  1. Create a DataFrame
  2. View basic info
  3. Select columns
  4. Filter rows

Up Next

Continue with Installation - Setting up Pandas.

Related Topics

Frequently Asked Questions about Get Started

What is Get Started in Pandas?

Get Started is a fundamental concept in Pandas. This lesson explains it step by step with clear examples, making it easy for beginners to understand.

How do I learn Get Started?

Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn Get Started.

Why is Get Started important in Pandas?

Get Started is essential for Pandas development. Understanding this concept will help you write better code and solve real-world problems more effectively.