diff --git a/pandas/io/excel.py b/pandas/io/excel.py index 5e4dd4379a8e3..89ce5aec8d264 100644 --- a/pandas/io/excel.py +++ b/pandas/io/excel.py @@ -29,6 +29,7 @@ from warnings import warn from distutils.version import LooseVersion from pandas.util.decorators import Appender +from textwrap import fill __all__ = ["read_excel", "ExcelWriter", "ExcelFile"] @@ -97,7 +98,7 @@ na_values : scalar, str, list-like, or dict, default None Additional strings to recognize as NA/NaN. If dict passed, specific per-column NA values. By default the following values are interpreted - as NaN: '""" + "', '".join(sorted(_NA_VALUES)) + """'. + as NaN: '""" + fill("', '".join(sorted(_NA_VALUES)), 70) + """'. thousands : str, default None Thousands separator for parsing string columns to numeric. Note that this parameter is only necessary for columns stored as TEXT in Excel, diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py index e765ebc36e33e..2ef0cbb0076fe 100755 --- a/pandas/io/parsers.py +++ b/pandas/io/parsers.py @@ -7,6 +7,7 @@ import csv import warnings import datetime +from textwrap import fill import numpy as np @@ -132,7 +133,7 @@ na_values : scalar, str, list-like, or dict, default None Additional strings to recognize as NA/NaN. If dict passed, specific per-column NA values. By default the following values are interpreted as - NaN: `'""" + "'`, `'".join(sorted(_NA_VALUES)) + """'`. + NaN: '""" + fill("', '".join(sorted(_NA_VALUES)), 70) + """'`. keep_default_na : bool, default True If na_values are specified and keep_default_na is False the default NaN values are overridden, otherwise they're appended to.