Sharedsupport / 2016-07-22-212701-csv-table.sagewsOpen in CoCalc
Examples for support purposes...
import pandas as pd
from StringIO import StringIO
def csv_table(str):
    df = pd.read_csv(StringIO((str)),index_col = 0)
    print(df)
%csv_table
Sample,start,middle,end
A,2,5,51
B,6,8,11
C,7,22,41
start middle end Sample A 2 5 51 B 6 8 11 C 7 22 41
import pandas as pd
from StringIO import StringIO
def csv_table(str):
    show(pd.read_csv(StringIO((str)),index_col = 0))
%csv_table2
Sample,start,middle,end
A,2,5,51
B,6,8,11
C,7,22,41.5
start middle end
Sample
A 2 5 51.0
B 6 8 11.0
C 7 22 41.5