PY-42705 DataView crashes with pandas 1.0.3

Update exception type in column type detection

Signed-off-by: Elizaveta Shashkova <Elizaveta.Shashkova@jetbrains.com>

GitOrigin-RevId: 24fa0bfcd7f0962dd2e5c969957a3aecae7a956e
This commit is contained in:
Elizaveta Shashkova
2020-06-09 20:48:36 +03:00
committed by intellij-monorepo-bot
parent cb532cd236
commit c6e824e253
2 changed files with 2 additions and 2 deletions
@@ -510,7 +510,7 @@ def dataframe_to_thrift_struct(df, name, roffset, coffset, rows, cols, format):
except AttributeError:
try:
kind = df.dtypes[0].kind
except IndexError:
except (IndexError, KeyError):
kind = "O"
format = array_default_format(kind)
else:
@@ -642,7 +642,7 @@ def dataframe_to_xml(df, name, roffset, coffset, rows, cols, format):
except AttributeError:
try:
kind = df.dtypes[0].kind
except IndexError:
except (IndexError, KeyError):
kind = 'O'
format = array_default_format(kind)
else: