[pycharm] PY-79381 Tables(Jupyter, DataView): add repr to fix rendering

GitOrigin-RevId: 8eb4fcea4985b505584c3dc15b8d7a90a4c2b694
This commit is contained in:
ekaterina.itsenko
2025-02-21 05:11:46 +00:00
committed by intellij-monorepo-bot
parent 9bfeaf8679
commit 3ac06e1f48
5 changed files with 5 additions and 5 deletions
@@ -70,7 +70,7 @@ def display_data_csv(table, start_index, end_index):
data = data.to_csv(na_rep = "NaN", sep=CSV_FORMAT_SEPARATOR, float_format=format)
except AttributeError:
pass
print(__convert_to_df(data))
print(repr(__convert_to_df(data)))
__compute_sliced_data(table, ipython_display, start_index, end_index)
@@ -80,7 +80,7 @@ def display_data_html(table, start_index=None, end_index=None):
def display_data_csv(table, start_index=None, end_index=None):
# type: (np.ndarray, int, int) -> None
def ipython_display(data, format):
print(__create_table(data, start_index, end_index).to_csv(na_rep ="None", sep=CSV_FORMAT_SEPARATOR, float_format=format))
print(repr(__create_table(data, start_index, end_index).to_csv(na_rep ="None", sep=CSV_FORMAT_SEPARATOR, float_format=format)))
__compute_data(table, ipython_display)
@@ -91,7 +91,7 @@ def display_data_html(table, start_index=None, end_index=None):
def display_data_csv(table, start_index=None, end_index=None):
# type: (np.ndarray, int, int) -> None
def ipython_display(data, format):
print(__create_table(data, start_index, end_index).to_csv(na_rep ="None", sep=CSV_FORMAT_SEPARATOR, float_format=format))
print(repr(__create_table(data, start_index, end_index).to_csv(na_rep ="None", sep=CSV_FORMAT_SEPARATOR, float_format=format)))
__compute_data(table, ipython_display)
@@ -89,7 +89,7 @@ def display_data_csv(table, start_index, end_index):
data = data.to_csv(na_rep = "NaN", sep=CSV_FORMAT_SEPARATOR, float_format=format)
except AttributeError:
pass
print(__convert_to_df(data))
print(repr(__convert_to_df(data)))
__compute_sliced_data(table, ipython_display, start_index, end_index)
@@ -72,7 +72,7 @@ def display_data_html(table, start_index, end_index):
def display_data_csv(table, start_index, end_index):
# type: (Union[pl.Series, pl.DataFrame], int, int) -> None
with __create_config():
print(__write_to_csv(__get_df_slice(table, start_index, end_index)))
print(repr(__write_to_csv(__get_df_slice(table, start_index, end_index))))
def get_column_descriptions(table):