chore: infer dtypes for columns as well, remove unneeded na_rep
This commit is contained in:
parent
767b8d611d
commit
fae0faf8dd
1 changed files with 4 additions and 8 deletions
|
|
@ -77,9 +77,9 @@ class ExcelConverterBase(DocumentConverter):
|
||||||
# Because the latter does not replace NaT's
|
# Because the latter does not replace NaT's
|
||||||
with pd.option_context("future.no_silent_downcasting", True):
|
with pd.option_context("future.no_silent_downcasting", True):
|
||||||
sheet = sheet.fillna(na_rep, axis=1).infer_objects(copy=False)
|
sheet = sheet.fillna(na_rep, axis=1).infer_objects(copy=False)
|
||||||
sheet.columns = sheet.columns.fillna(na_rep)
|
sheet.columns = sheet.columns.fillna(na_rep).infer_objects(copy=False)
|
||||||
|
|
||||||
html_content = sheet.to_html(index=False, na_rep=na_rep)
|
html_content = sheet.to_html(index=False)
|
||||||
md_content += (
|
md_content += (
|
||||||
self._html_converter.convert_string(
|
self._html_converter.convert_string(
|
||||||
html_content, **kwargs
|
html_content, **kwargs
|
||||||
|
|
@ -127,9 +127,7 @@ class XlsxConverter(ExcelConverterBase):
|
||||||
extension=".xlsx",
|
extension=".xlsx",
|
||||||
feature="xlsx",
|
feature="xlsx",
|
||||||
)
|
)
|
||||||
) from _xlsx_dependency_exc_info[
|
) from _xlsx_dependency_exc_info[1].with_traceback( # type: ignore[union-attr]
|
||||||
1
|
|
||||||
].with_traceback( # type: ignore[union-attr]
|
|
||||||
_xlsx_dependency_exc_info[2]
|
_xlsx_dependency_exc_info[2]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -178,9 +176,7 @@ class XlsConverter(ExcelConverterBase):
|
||||||
extension=".xls",
|
extension=".xls",
|
||||||
feature="xls",
|
feature="xls",
|
||||||
)
|
)
|
||||||
) from _xls_dependency_exc_info[
|
) from _xls_dependency_exc_info[1].with_traceback( # type: ignore[union-attr]
|
||||||
1
|
|
||||||
].with_traceback( # type: ignore[union-attr]
|
|
||||||
_xls_dependency_exc_info[2]
|
_xls_dependency_exc_info[2]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue