DataFrame in Python

From the Pandas cheat sheet ยท Setup and Core Structures ยท verified Aug 2026

DataFrame

Create a labeled two-dimensional table.

python
df = pd.DataFrame({
    "name": ["Ana", "Ben"],
    "score": [88, 92],
})
๐Ÿ“Œ Columns can have different dtypes
๐Ÿ’ก Build from records for API-style data
๐Ÿ” The Index labels rows independently of position
๐ŸŽฏ Keep column names consistent at ingestion
dataframerecordsindex

Continue with Pandas

Save the full cheat sheet or work through every related task.

More Python tasks

Back to the full Pandas cheat sheet