The Pandas library (imported as import pandas as pd) provides the DataFrame, a two-dimensional, size-mutable, tabular data structure with labeled rows and columns. Think of it as a spreadsheet or a SQL table that lives in memory: columns can hold different dtypes, and both rows and columns are indexed, which makes label-aware selection natural. The DataFrame sits at the center of nearly every data-analysis workflow in Python.
You can build a DataFrame from many sources. The simplest in-memory options pass a dictionary of lists — pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]}) — where each key becomes a column label. You can also build one from a list of dictionaries, in which case missing keys across rows are filled with NaN. For data on disk, Pandas exposes readers for the common formats: pd.read_csv('file.csv') for comma-separated files, pd.read_excel('file.xlsx', sheet_name='Sheet1') for spreadsheets, and pd.read_json('file.json') for JSON. For line-delimited JSON you may need to pass orient='records'. Writing back is just as direct: df.to_csv('file.csv', index=False) saves a frame to disk while skipping the row index column.