mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
DS-5081 DS-5118 Polars display configuration added
* No limits for number of columns being displayed * Long cell values are not truncated GitOrigin-RevId: ee4d6b4c9ddaf5a3921f814b05b11247082cdba8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
77faaa3c41
commit
4e6303b96f
@@ -16,7 +16,8 @@ def get_shape(table):
|
||||
|
||||
def get_head(table, max_cols):
|
||||
# type: (pl.DataFrame, int) -> str
|
||||
return table.head()._repr_html_()
|
||||
with __create_config():
|
||||
return table.head()._repr_html_()
|
||||
|
||||
|
||||
def get_column_types(table):
|
||||
@@ -30,10 +31,17 @@ def get_column_types(table):
|
||||
# used by pydevd, isDisplaySupported equals false
|
||||
def get_data(table, max_cols, max_colwidth, start_index=None, end_index=None):
|
||||
# type: (pl.DataFrame, int, int, int, int) -> str
|
||||
return table[start_index:end_index]._repr_html_()
|
||||
with __create_config():
|
||||
return table[start_index:end_index]._repr_html_()
|
||||
|
||||
|
||||
# used by DSTableCommands isDisplaySupported equals true
|
||||
def display_data(table, max_cols, max_colwidth, start, end):
|
||||
# type: (pl.DataFrame, int, int, int, int) -> None
|
||||
print(table[start:end]._repr_html_())
|
||||
with __create_config():
|
||||
print(table[start:end]._repr_html_())
|
||||
|
||||
|
||||
def __create_config():
|
||||
# type: () -> pl.Config
|
||||
return pl.Config(fmt_str_lengths=1000, set_tbl_cols=-1)
|
||||
|
||||
Reference in New Issue
Block a user