mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 11:53:49 +07:00
[pycharm] PY-77455 Tables(Jupyter, DataView): Add the correct separator
(cherry picked from commit 7d83ea766b39cc05cb2811aa3a2dd390aec9516b) IJ-MR-149724 GitOrigin-RevId: 14878906578828af11b06661729b9ea2f78d0db2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
04517028c6
commit
a537a9ddcf
@@ -5,6 +5,8 @@ TABLE_TYPE_NEXT_VALUE_SEPARATOR = '__pydev_table_column_type_val__'
|
||||
MAX_COLWIDTH_PYTHON_2 = 100000
|
||||
BATCH_SIZE = 10000
|
||||
|
||||
CSV_FORMAT_SEPARATOR = '~'
|
||||
|
||||
|
||||
def get_type(table):
|
||||
# type: (str) -> str
|
||||
@@ -37,7 +39,7 @@ def get_data(table, use_csv_serialization, start_index=None, end_index=None, for
|
||||
# type: (datasets.arrow_dataset.Dataset, int, int) -> str
|
||||
|
||||
def convert_data_to_csv(data):
|
||||
return repr(data.to_csv(na_rep = "NaN", float_format=format))
|
||||
return repr(data.to_csv(na_rep = "NaN", float_format=format, sep=CSV_FORMAT_SEPARATOR))
|
||||
|
||||
def convert_data_to_html(data):
|
||||
return repr(data.to_html(notebook=True))
|
||||
@@ -55,7 +57,7 @@ def display_data_csv(table, start_index, end_index):
|
||||
# type: (datasets.arrow_dataset.Dataset, int, int) -> None
|
||||
def ipython_display(data):
|
||||
try:
|
||||
data = data.to_csv(na_rep = "NaN")
|
||||
data = data.to_csv(na_rep = "NaN", sep=CSV_FORMAT_SEPARATOR)
|
||||
except AttributeError:
|
||||
pass
|
||||
print(data)
|
||||
|
||||
Reference in New Issue
Block a user