diff --git a/ci/deps/azure-38.yaml b/ci/deps/azure-38.yaml index 954e9710f79b9..89e8d28a139b7 100644 --- a/ci/deps/azure-38.yaml +++ b/ci/deps/azure-38.yaml @@ -17,4 +17,4 @@ dependencies: - python-dateutil - nomkl - pytz - - tabulate==0.8.3 + - tabulate==0.8.7 diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index c823ad01f10bf..2c829bc664c6c 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -283,7 +283,7 @@ pyreadstat SPSS files (.sav) reading pyxlsb 1.0.6 Reading for xlsb files qtpy Clipboard I/O s3fs 0.4.0 Amazon S3 access -tabulate 0.8.3 Printing in Markdown-friendly format (see `tabulate`_) +tabulate 0.8.7 Printing in Markdown-friendly format (see `tabulate`_) xarray 0.12.3 pandas-like API for N-dimensional data xclip Clipboard I/O on linux xlrd 1.2.0 Excel reading diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index d0afc24aaecac..63545ca55789a 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -37,7 +37,76 @@ These are bug fixes that might have notable behavior changes. Increased minimum versions for dependencies ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - +Some minimum supported versions of dependencies were updated. +If installed, we now require: + ++-----------------+-----------------+----------+---------+ +| Package | Minimum Version | Required | Changed | ++=================+=================+==========+=========+ +| numpy | 1.16.5 | X | | ++-----------------+-----------------+----------+---------+ +| pytz | 2017.3 | X | | ++-----------------+-----------------+----------+---------+ +| python-dateutil | 2.7.3 | X | | ++-----------------+-----------------+----------+---------+ +| bottleneck | 1.2.1 | | | ++-----------------+-----------------+----------+---------+ +| numexpr | 2.6.8 | | | ++-----------------+-----------------+----------+---------+ +| pytest (dev) | 5.0.1 | | | ++-----------------+-----------------+----------+---------+ +| mypy (dev) | 0.782 | | | ++-----------------+-----------------+----------+---------+ + +For `optional libraries `_ the general recommendation is to use the latest version. +The following table lists the lowest version per library that is currently being tested throughout the development of pandas. +Optional libraries below the lowest tested version may still work, but are not considered supported. + ++-----------------+-----------------+---------+ +| Package | Minimum Version | Changed | ++=================+=================+=========+ +| beautifulsoup4 | 4.6.0 | | ++-----------------+-----------------+---------+ +| fastparquet | 0.3.2 | | ++-----------------+-----------------+---------+ +| fsspec | 0.7.4 | | ++-----------------+-----------------+---------+ +| gcsfs | 0.6.0 | | ++-----------------+-----------------+---------+ +| lxml | 4.3.0 | | ++-----------------+-----------------+---------+ +| matplotlib | 2.2.3 | | ++-----------------+-----------------+---------+ +| numba | 0.46.0 | | ++-----------------+-----------------+---------+ +| openpyxl | 2.6.0 | | ++-----------------+-----------------+---------+ +| pyarrow | 0.15.0 | | ++-----------------+-----------------+---------+ +| pymysql | 0.7.11 | | ++-----------------+-----------------+---------+ +| pytables | 3.5.1 | | ++-----------------+-----------------+---------+ +| s3fs | 0.4.0 | | ++-----------------+-----------------+---------+ +| scipy | 1.2.0 | | ++-----------------+-----------------+---------+ +| sqlalchemy | 1.2.8 | | ++-----------------+-----------------+---------+ +| tabulate | 0.8.7 | X | ++-----------------+-----------------+---------+ +| xarray | 0.12.0 | | ++-----------------+-----------------+---------+ +| xlrd | 1.2.0 | | ++-----------------+-----------------+---------+ +| xlsxwriter | 1.0.2 | | ++-----------------+-----------------+---------+ +| xlwt | 1.3.0 | | ++-----------------+-----------------+---------+ +| pandas-gbq | 0.12.0 | | ++-----------------+-----------------+---------+ + +See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for more. .. _whatsnew_130.api.other: diff --git a/pandas/compat/_optional.py b/pandas/compat/_optional.py index 533e67acfa2f4..3775a47d44521 100644 --- a/pandas/compat/_optional.py +++ b/pandas/compat/_optional.py @@ -24,7 +24,7 @@ "scipy": "1.2.0", "sqlalchemy": "1.2.8", "tables": "3.5.1", - "tabulate": "0.8.3", + "tabulate": "0.8.7", "xarray": "0.12.3", "xlrd": "1.2.0", "xlwt": "1.3.0", diff --git a/pandas/tests/io/formats/test_to_markdown.py b/pandas/tests/io/formats/test_to_markdown.py index 5223b313fef4f..2bd0d11888163 100644 --- a/pandas/tests/io/formats/test_to_markdown.py +++ b/pandas/tests/io/formats/test_to_markdown.py @@ -18,6 +18,17 @@ def test_simple(): ) +def test_empty_frame(): + buf = StringIO() + df = pd.DataFrame({"id": [], "first_name": [], "last_name": []}).set_index("id") + df.to_markdown(buf=buf) + result = buf.getvalue() + assert result == ( + "| id | first_name | last_name |\n" + "|------|--------------|-------------|" + ) + + def test_other_tablefmt(): buf = StringIO() df = pd.DataFrame([1, 2, 3])