Skip to content Skip to sidebar Skip to footer

Html Code To Show Splitted Data_frame In One Html Page Using Python

I am newbie in html/css so and having question about data showing in html format. What i have is a long list which i want to split and show in html format as two separate columns.F

Solution 1:

As your data is managed by a pandas.DataFrame, I would suggest you try to build your table using pandas.

pd.merge(left=df_data[0:4], left_index=True,
         right=df_data[4:8].reset_index(drop=True), right_index=True,
         suffixes=['_left','_right'], how='outer')

   Col1_leftCol2_leftCol1_rightCol2_right01a5b12a6b23a7b34a8b

Solution 2:

Found solution! When we read data from data_frame, we can firstly trunctate it by desired qty and then we need to remove previous indexing and then we can concat that data:

pirmas_m = df_data[0:30].reset_index(drop=True)
    antras_m = df_data[30:60].reset_index(drop=True)
    trecias_m = df_data[60:90].reset_index(drop=True)
    ketvirtas_m = df_data[90:120].reset_index(drop=True)
    opa = pd.concat(  [pirmas_m, antras_m, trecias_m, ketvirtas_m], axis=1  )

Post a Comment for "Html Code To Show Splitted Data_frame In One Html Page Using Python"