mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
[PyCharm Tables] PY-72208 fixed table info extracting when pandas is not installed for torch, tensorflow
(cherry picked from commit 80074e8429a4c881d79f5679962f4711db8561c1) (cherry picked from commit 2829893866821fbbb2c0229abce67caa3a5e6993) IJ-CR-147319 GitOrigin-RevId: 905af935c1d4c0dedc32a744040f4de97cc870dc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
48cd6487ae
commit
d3c97e24b0
@@ -99,11 +99,11 @@ class _NpTable:
|
||||
# [[1, 2], [3, 4]] -> [int, int]
|
||||
return [str(col_type) for _ in range(len(self.array[0]))]
|
||||
|
||||
def head(self):
|
||||
def head(self, num_rows):
|
||||
if self.array.shape[0] < 6:
|
||||
return self
|
||||
|
||||
return _NpTable(self.array[:5]).sort()
|
||||
return _NpTable(self.array[:num_rows]).sort()
|
||||
|
||||
def to_html(self, notebook):
|
||||
html = ['<table class="dataframe">\n']
|
||||
|
||||
Reference in New Issue
Block a user