Examples
import numpy as np
import pandas as pd
df = pd.DataFrame([['p', 'q'], ['r', 's']],
index=['row 1', 'row 2'],
columns=['c1', 'c2'])
df.to_json(orient='split')
Encoding/decoding a Dataframe using 'records' formatted JSON:
df.to_json(orient='records')
Encoding/decoding a Dataframe using 'index' formatted JSON:
df.to_json(orient='index')
Encoding/decoding a Dataframe using 'columns' formatted JSON:
df.to_json(orient='columns')
Encoding/decoding a Dataframe using 'values' formatted JSON:
df.to_json(orient='values')
Encoding with Table Schema:
df.to_json(orient='table')