Python Create DataFrame
pd.DataFramePractice

Build a table from column lists

Each dict key becomes a column. Press Run to assemble rows one at a time.

Picture this: columns from a dict

Keys become headers. Lists become the column values.

{'name': [...]}dict of lists
→
pd.DataFramebuild
→
print(df)table

In easy words

A DataFrame is a spreadsheet in Python: named columns, numbered rows.

Where this is used

Turning cleaned lists into analysis tables before CSV export or plotting.

Run algorithm

Each step highlights the matching Python line. Program output appears only when a line that prints actually runs.

Ready
namescore
1import pandas as pd
2df = pd.DataFrame({"name": ["A", "B"], "score": [90, 80]})
3print(df)
Output:

Example Program

1import pandas as pd
2df = pd.DataFrame({"name": ["A", "B"], "score": [90, 80]})
3print(df)