Closed CavemanWork closed 2 years ago
Any update ?
Hi @CavemanWork , well below are some experiments, please let me know if any of them is close to what you want to do...
If we do
import itables
import itables.options as opt
import pandas as pd
opt.maxBytes = 2**20
bg_all_df = pd.DataFrame({"text":["long " * 128 + "text"]})
opt.classes = ["display", "cell-border"]
itables.show(
bg_all_df
)
the cell content is wrapped
Now if we do
opt.classes = ["display", "nowrap"]
itables.show(bg_all_df)
then it appears truncated:
And finally if we set a custom width (but I don't know how to set the width automatically, maybe you can ask at https://datatables.net ?) we can scroll horizontally:
itables.show(bg_all_df, columnDefs=[{"width": "4000px", "targets": "_all"}])
Hope that helps!
Version: itables==0.3.0
Code:
Issue: If the text lenght larger than threshold if found that the tail will cutdown. how to show the full centent in the cell without wrap?