Skip to content

Commit

Permalink
Merge pull request #9247 from bashtage/pandas-3-compat
Browse files Browse the repository at this point in the history
MAINT: Additional fixes for pandas 3
  • Loading branch information
bashtage committed May 14, 2024
2 parents ba1ffab + 533d3cc commit bc18995
Show file tree
Hide file tree
Showing 52 changed files with 364 additions and 168 deletions.
1 change: 1 addition & 0 deletions docs/source/release/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Release Notes
.. toctree::
:maxdepth: 1

version0.14.2
version0.14.1
version0.14.0
version0.13.4-5
Expand Down
166 changes: 166 additions & 0 deletions docs/source/release/version0.14.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
:orphan:

==============
Release 0.14.2
==============

Release summary
===============

statsmodels is using github to store the updated documentation. Two version are available:

- `Stable <https://www.statsmodels.org/>`_, the latest release
- `Development <https://www.statsmodels.org/devel/>`_, the latest build of the main branch

**Warning**

API stability is not guaranteed for new features, although even in
this case changes will be made in a backwards compatible way if
possible. The stability of a new feature depends on how much time it
was already in statsmodels main and how much usage it has already
seen. If there are specific known problems or limitations, then they
are mentioned in the docstrings.

Stats
-----
**Issues Closed**: 22

**Pull Requests Merged**: 24


The Highlights
==============
This release brings compatibility with NumPy 2.0.0. This is the only key feature
of this release. Several minor patches have been backported. These either
fix bugs that have been documented, improve the documentation or are necessary for
NumPy 2.0 compatability.

NumPy 2.0 is only available for Python 3.9+. This means that the minimum Python
has been increased to 3.9 to match. NumPy 2 is only required to build statsmodels,
and statsmodels will continue to run on NumPy 1.22.3+.

Note that when running using NumPy 2, all dependencies that use build against NumPy
(e.g., Scipy and pandas) must be NumPy 2 compatible. You can continue to run against
NumPy 1.22 - 1.26 along with other components of the scientific Python stack until
all required dependencies have been updated.


What's new - an overview
========================

The following lists the main new features of statsmodels 0.14.2. In addition,
release 0.14.2 includes bug fixes, refactorings and improvements in many areas.

Submodules
----------


``dependencies``
~~~~~~~~~~~~~~~~
- Bump github/codeql-action from 2 to 3 (:pr:`9098`)
- Bump ts-graphviz/setup-graphviz from 1 to 2 (:pr:`9149`)



``multivariate``
~~~~~~~~~~~~~~~~
- Add MultivariateLS (:pr:`8919`)



``robust``
~~~~~~~~~~
- Outlier robust covariance - rebased (:pr:`8129`)



``stats``
~~~~~~~~~
- Outlier robust covariance - rebased (:pr:`8129`)



``tsa.statespace``
~~~~~~~~~~~~~~~~~~
- Ensure ARIMA simulation is reproducable (:pr:`9165`)





bug-wrong
---------

A new issue label `type-bug-wrong` indicates bugs that cause that incorrect
numbers are returned without warnings.
(Regular bugs are mostly usability bugs or bugs that raise an exception for
unsupported use cases.)
`see tagged issues <https://github.com/statsmodels/statsmodels/issues?q=is%3Aissue+label%3Atype-bug-wrong+is%3Aclosed+milestone%3A0.14>`_


Major Bugs Fixed
================

See github issues for a list of bug fixes included in this release

- `Closed bugs <https://github.com/statsmodels/statsmodels/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+milestone%3A0.14+label%3Atype-bug>`_
- `Closed bugs (wrong result) <https://github.com/statsmodels/statsmodels/pulls?q=is%3Apr+is%3Amerged+milestone%3A0.14+label%3Atype-bug-wrong>`_


Development summary and credits
===============================

Besides receiving contributions for new and improved features and for bugfixes,
important contributions to general maintenance for this release came from

- Chad Fulton
- Brock Mendel
- Peter Quackenbush
- Kerby Shedden
- Kevin Sheppard

and the general maintainer and code reviewer

- Josef Perktold

Additionally, many users contributed by participation in github issues and
providing feedback.

Thanks to all of the contributors for the 0.14.2 release (based on git log):

- Josef Perktold
- Kevin Sheppard
- Manlai Amar
- Michel De Ruiter
- Trinh Quoc Anh
- Zhengbo Wang
- cppt
- dependabot[bot]
- s174139


These lists of names are automatically generated based on git log, and may not
be complete.

Merged Pull Requests
--------------------

The following Pull Requests were merged since the last release:

- :pr:`9029`: Update seasonal.py
- :pr:`9098`: Bump github/codeql-action from 2 to 3
- :pr:`9110`: BLD: Update minimums
- :pr:`9111`: MAINT: Fix future issues in pandas
- :pr:`9115`: MAINT: Clean up and silence some warnings
- :pr:`9117`: edited requirements.txt
- :pr:`9124`: MAINT: Fix future issues due to array shapes
- :pr:`9142`: Fix linting error
- :pr:`9143`: Fix string formatting
- :pr:`9144`: MAINT: Replace quarterly string identified
- :pr:`9149`: Bump ts-graphviz/setup-graphviz from 1 to 2
- :pr:`9150`: MAINT: Fixes for future changes
- :pr:`9158`: DOC: Fix broken in `linear_regression_diagnostics_plots`
- :pr:`9165`: BUG: Ensure ARIMA simulation is reproducable
- :pr:`9192`: DOC: fixed boxpierece typos
- :pr:`9195`: MAINT: Make compatability with NumPy 2
- :pr:`9200`: Cherry pick commits from 0.15 for 0.14.3
2 changes: 1 addition & 1 deletion docs/source/release/version0.6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ We added a naive seasonal decomposition tool in the same vein as R's ``decompose

dta = sm.datasets.co2.load_pandas().data
# deal with missing values. see issue
dta.co2.interpolate(inplace=True)
dta = dta.co2.interpolate()

res = sm.tsa.seasonal_decompose(dta.co2)
res.plot()
Expand Down
6 changes: 3 additions & 3 deletions examples/notebooks/autoregressive_distributed_lag.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@
"metadata": {},
"outputs": [],
"source": [
"greene = pd.read_fwf(\"http://www.stern.nyu.edu/~wgreene/Text/Edition7/TableF5-2.txt\")\n",
"greene = pd.read_fwf(\"https://raw.githubusercontent.com/statsmodels/smdatasets/main/data/autoregressive-distributed-lag/green/ardl_data.txt\")\n",
"greene.head()"
]
},
Expand Down Expand Up @@ -718,9 +718,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
}
12 changes: 8 additions & 4 deletions examples/notebooks/glm_formula.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -66,6 +67,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand All @@ -87,6 +89,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
Expand Down Expand Up @@ -114,20 +117,21 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
"print(mod1.params[1])\n",
"print(mod2.params[1] * 2)"
"print(mod1.params.iloc[1])\n",
"print(mod2.params.iloc[1] * 2)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -141,7 +145,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
12 changes: 2 additions & 10 deletions examples/notebooks/multivariate_ls.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@
"ex = pd.DataFrame(data_exog[\"prog\"].unique(), columns=[\"prog\"])\n",
"mean_ex = data_mvreg[['read', 'write', 'science']].mean()\n",
"\n",
"ex[['read', 'write', 'science']] = mean_ex\n",
"ex.loc[:, ['read', 'write', 'science']] = mean_ex.values\n",
"ex"
]
},
Expand Down Expand Up @@ -605,14 +605,6 @@
"source": [
"plt.plot(res._hat_matrix_diag, res.resid_distance, \".\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c4fdeb7f",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -631,7 +623,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.10"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions examples/notebooks/rolling_ls.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -291,7 +291,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.10.12"
},
"pycharm": {
"stem_cell": {
Expand Down

0 comments on commit bc18995

Please sign in to comment.