In [2]:
import pandas as pd
from pathlib import Path
In [3]:
filename = Path('csv/comma_delimited/HeLaL_Control_1.csv')
In [4]:
df = pd.read_csv(filename)
In [5]:
df
Out[5]:
In [7]:
outputfile = Path('json/columns/HeLaL_Control_1.json')
df.to_json(str(outputfile), orient='columns')
outputfile = Path('json/index/HeLaL_Control_1.json')
df.to_json(str(outputfile), orient='index')
In [11]:
df2=pd.read_json(str(outputfile), orient='index')
In [13]:
len(df2.columns)
Out[13]:
In [ ]: