DataFrame (2D)

2-Dimensional
# Creating a DataFrame
import pandas as pd

data = {
  'Name': ['Alice', 'Bob', 'Charlie', 'Diana', 'Eva'],
  'Age': [25, 30, 35, 28, 32],
  'Salary': [50000, 60000, 70000, 55000, 65000],
  'Department': ['IT', 'Finance', 'IT', 'HR', 'Finance']
}

df = pd.DataFrame(data)
print(df)
A DataFrame is a 2-dimensional labeled data structure with columns of potentially different types. You can think of it as a spreadsheet or SQL table, or a dictionary of Series objects.

Series (1D)

1-Dimensional

Click on a DataFrame column header

Select a column from the DataFrame to visualize it as a Series

# Accessing a column as a Series
# Click on a column header to see the code
A Series is a 1-dimensional array holding data of any type. It's like a single column in a DataFrame. Each Series has a data type (dtype) and an index.