I am trying to swap the data table column as row row as column based on teh react form value i need to customize the bokeh table dynamically how will i do,
lets explain breifely,
i have an react application, in thet i have the draggable ,menu list, when i drop the menu item uit render the bokeh charts, table, the bokeh contents are written in the python .I connect the python file using the flask server . ijn tyhis if i receive the chart type 13 that time i need to drop the bokeh datatable in react i have the form that form contain some option like excel sheet if the condtional column and the APPLY COLUMN AND CONDTION TYPE BASED ON THE CONDITION I NEED TO MAKE THE BOLD,ITALIC, UNDERLINE COLOR CHANGE AND BACKGROUND COLORING IN THE FRONT END CODE, HOW WILL I DO
IN THE 2nd image swap button click i need to swap the row as the column and column as the row …elif chart_type == 13:
data_key = 'data' # Replace this with the actual key in your dictionary
# Use table_data to generate the Bokeh DataTable
df = pd.DataFrame(table_data.get(data_key, []))
# if is_transposed:
# # Transpose the DataFrame
# print("fghfghfghfghfghfghfhf")
# df = df.transpose()
# print(df)
transposed_df = df.transpose()
print(transposed_df,"tdt")
source = ColumnDataSource(df)
# source = ColumnDataSource( transposed_df )
# stats = df.describe().reset_index()
# source_stats = ColumnDataSource(stats)
columns = [TableColumn(field=col, title=col,) for col in df.columns]
p = DataTable(source=source, columns=columns,editable=True) this is my python code for bokeh datatable