Go to Sign up
Note: Your files never leave your device. We don't upload, transfer, or store your data.
Pandas is the most widely used data analysis library for Python. It provides two primary data structures — Series (1D) and DataFrame (2D) — along with tools for reading, writing, filtering, grouping, transforming, and visualizing data.
import pandas as pd| Fact | Details |
|---|---|
| Full name | Python Data Analysis Library |
| First release | 2008 |
| Author | Wes McKinney |
| Used by | Data scientists, analysts, ML engineers, researchers |
| Install | pip install pandas |
| Import convention | import pandas as pd |
A DataFrame is a 2D labeled data structure with rows and columns — similar to a spreadsheet, SQL table, or R data.frame. It is the core data structure in Pandas.
import pandas as pd
df = pd.DataFrame({
'name': ['Alice', 'Bob', 'Charlie'],
'age': [30, 25, 35],
'city': ['New York', 'London', 'Tokyo']
})
print(df)
name age city
0 Alice 30 New York
1 Bob 25 London
2 Charlie 35 Tokyo
| Property | Description |
|---|---|
| Columns | Labeled, can be any data type |
| Index | Row labels (default: 0, 1, 2, ...) |
| dtypes | Each column has a data type (int, float, str, etc.) |
| Shape | (rows, columns) tuple |
| Mutable | Values can be modified in-place |
Pandas supports two primary ways to construct a DataFrame from data:
Each dictionary represents one row. Keys are column names.
df = pd.DataFrame([
{'name': 'Alice', 'age': 30, 'city': 'New York'},
{'name': 'Bob', 'age': 25, 'city': 'London'},
{'name': 'Charlie', 'age': 35, 'city': 'Tokyo'}
])
| Aspect | Details |
|---|---|
| Input format | List of dictionaries |
| Each dict | One row |
| Keys | Column names |
| Best for | JSON API responses, heterogeneous records |
| Missing keys | Become NaN |
Each key is a column name, and the value is a list of values for that column.
df = pd.DataFrame({
'name': ['Alice', 'Bob', 'Charlie'],
'age': [30, 25, 35],
'city': ['New York', 'London', 'Tokyo']
})
| Aspect | Details |
|---|---|
| Input format | Dictionary of lists |
| Each key | Column name |
| Each list | All values for that column |
| Best for | Numeric data, time series, bulk operations |
| Performance | Faster for large datasets (columnar layout) |
| Scenario | Recommended |
|---|---|
| JSON API response (array of objects) | Row-oriented |
| CSV-like data | Column-oriented |
| Mixed data types per record | Row-oriented |
| Large numeric datasets | Column-oriented |
| Missing fields in some records | Row-oriented (handles gracefully) |
| Machine learning features | Column-oriented |
| Use Case | Description |
|---|---|
| Data analysis | Load JSON data into Pandas for exploration and statistics |
| Machine learning | Prepare training data from JSON into DataFrame format |
| Data cleaning | Use Pandas' powerful cleaning tools on JSON-sourced data |
| Visualization | Plot JSON data using Matplotlib, Seaborn, or Plotly via Pandas |
| Testing | Create test DataFrames from JSON fixtures for unit tests |
| Jupyter notebooks | Paste generated code directly into notebook cells |
| ETL pipelines | Generate DataFrame construction code for data pipelines |
| Education | Teach Pandas concepts with concrete data examples |
File Upload: Drag and drop or select a .json file.
Code Editor: Paste or type raw JSON with syntax highlighting and real-time validation.
Choose how the DataFrame is constructed:
Input JSON:
[
{"name": "Alice", "age": 30, "city": "New York"},
{"name": "Bob", "age": 25, "city": "London"},
{"name": "Charlie", "age": 35, "city": "Tokyo"}
]
Output:
import pandas as pd
df = pd.DataFrame([
{'name': 'Alice', 'age': 30, 'city': 'New York'},
{'name': 'Bob', 'age': 25, 'city': 'London'},
{'name': 'Charlie', 'age': 35, 'city': 'Tokyo'}
])
Same input JSON.
Output:
import pandas as pd
df = pd.DataFrame({
'name': ['Alice', 'Bob', 'Charlie'],
'age': [30, 25, 35],
'city': ['New York', 'London', 'Tokyo']
})
All processing runs entirely in your browser. No data is uploaded to any server.
Choose one of two input methods:
Upload a file: Click "Choose File" and select a .json file, or drag it into the upload area.
Paste data: Click "Enter Data" to switch to the code editor. Paste your JSON array. A "Valid JSON" badge confirms correct formatting.
Important: The tool expects a JSON array of objects.
In the Properties panel:
By Rows: List of dicts — one dict per row (default)
By Columns: Dict of lists — one key per column
Click Convert. The Python code appears in the "Output Data" panel.
Click Copy to Clipboard to paste into your .py file or Jupyter notebook.
Premium users can click Download File to save.
Input JSON:
[
{"id": 1, "product": "Laptop", "price": 1299.99, "in_stock": true},
{"id": 2, "product": "Phone", "price": 699.99, "in_stock": false},
{"id": 3, "product": "Tablet", "price": 499.99, "in_stock": true}
]
Configuration: Data Orientation = By Rows
Output:
import pandas as pd
df = pd.DataFrame([
{'id': 1, 'product': 'Laptop', 'price': 1299.99, 'in_stock': True},
{'id': 2, 'product': 'Phone', 'price': 699.99, 'in_stock': False},
{'id': 3, 'product': 'Tablet', 'price': 499.99, 'in_stock': True}
])
print(df)
print(df.dtypes)
print(df.describe())
Same input JSON.
Configuration: Data Orientation = By Columns
Output:
import pandas as pd
df = pd.DataFrame({
'id': [1, 2, 3],
'product': ['Laptop', 'Phone', 'Tablet'],
'price': [1299.99, 699.99, 499.99],
'in_stock': [True, False, True]
})
print(df)
Input JSON:
[
{"timestamp": "2026-05-06T08:00:00", "temperature": 23.5, "humidity": 45.2, "pressure": 1013.1},
{"timestamp": "2026-05-06T08:05:00", "temperature": 23.8, "humidity": 44.8, "pressure": 1013.0},
{"timestamp": "2026-05-06T08:10:00", "temperature": 24.1, "humidity": 43.5, "pressure": 1012.8},
{"timestamp": "2026-05-06T08:15:00", "temperature": 23.9, "humidity": 44.1, "pressure": 1012.9}
]
Column-oriented output is ideal for time-series operations:
import pandas as pd
df = pd.DataFrame({
'timestamp': ['2026-05-06T08:00:00', '2026-05-06T08:05:00', '2026-05-06T08:10:00', '2026-05-06T08:15:00'],
'temperature': [23.5, 23.8, 24.1, 23.9],
'humidity': [45.2, 44.8, 43.5, 44.1],
'pressure': [1013.1, 1013.0, 1012.8, 1012.9]
})
df['timestamp'] = pd.to_datetime(df['timestamp'])
df = df.set_index('timestamp')
print(df.mean())
df.plot()
Input JSON:
[
{"name": "Alice", "email": "[email protected]", "active": true},
{"name": "Bob", "active": false},
{"name": "Charlie", "email": "[email protected]", "active": true, "role": "admin"}
]
Row-oriented handles missing fields gracefully (become NaN):
import pandas as pd
df = pd.DataFrame([
{'name': 'Alice', 'email': '[email protected]', 'active': True},
{'name': 'Bob', 'active': False},
{'name': 'Charlie', 'email': '[email protected]', 'active': True, 'role': 'admin'}
])
# Missing fields become NaN
print(df)
# active email name role
# 0 True [email protected] Alice NaN
# 1 False NaN Bob NaN
# 2 True charlie@... Charlie admin
import pandas as pd
# From file
df = pd.read_json('data.json')
# From string
df = pd.read_json('[{"name": "Alice", "age": 30}]')
| Aspect | pd.read_json() |
|---|---|
| When to use | Dynamic JSON from files, APIs, URLs |
| Requires | File or string at runtime |
| Flexibility | Handles many JSON structures |
| Dependencies | Requires pandas installed at runtime |
| Aspect | This Tool |
|---|---|
| When to use | Static data, testing, notebooks, education |
| Output | Self-contained Python code |
| Flexibility | Choose row or column orientation |
| Dependencies | None at conversion time; code runs anywhere pandas is installed |
| Advantage | Readable, editable, version-controllable code |
| JSON Type | JSON Example | Pandas dtype |
|---|---|---|
| String | "hello" | object (string) |
| Integer | 42 | int64 |
| Float | 3.14 | float64 |
| Boolean | true | bool |
| Null | null | NaN (float64) |
| Mixed types in column | [1, "two", 3] | object |
import pandas as pd
df = pd.DataFrame([
{'name': 'Alice', 'age': 30, 'score': 95},
{'name': 'Bob', 'age': 25, 'score': 88},
{'name': 'Charlie', 'age': 35, 'score': 72}
])
# Basic info
df.shape # (3, 3)
df.dtypes # Column types
df.head() # First 5 rows
df.describe() # Statistical summary
# Filtering
df[df['age'] > 25]
# Sorting
df.sort_values('score', ascending=False)
# Grouping
df.groupby('age')['score'].mean()
# Adding columns
df['grade'] = df['score'].apply(lambda x: 'A' if x >= 90 else 'B')
# Export
df.to_csv('output.csv', index=False)
df.to_json('output.json', orient='records')
No. All conversion happens locally in your browser using JavaScript. Your data never leaves your device.
A DataFrame is a 2D labeled data structure in the Pandas library for Python. It has labeled rows and columns, supports mixed data types, and provides powerful methods for data analysis, filtering, grouping, and visualization.
Row-oriented creates a list of dictionaries (one dict per row). Column-oriented creates a dictionary of lists (one key per column with all values). Row-oriented is natural for JSON API responses; column-oriented is more memory-efficient for large numeric datasets.
Use row-oriented for JSON API responses with heterogeneous records or missing fields. Use column-oriented for large numeric datasets, time series, or ML feature matrices.
A JSON array of objects: [{"key": "value"}, ...]. Each object becomes one row. Object keys become column names.
Yes. Copy the generated code and paste it directly into a Jupyter notebook cell. The output is standard Python code that runs anywhere Pandas is installed.
JSON null values are converted to None in the Python code, which Pandas represents as NaN in the DataFrame.
No. pd.read_json() parses JSON at runtime. This tool generates Python source code that constructs a DataFrame. Use this tool for static data, testing, or when you want readable, editable code.
The tool processes data entirely in your browser. Files up to 10 MB typically convert without issues on modern hardware.
Yes. The tool is responsive and works on smartphones and tablets.