From 7dd4fc14f96ade1790a589b53a7d80b2dd36e5e4 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Thu, 11 May 2023 15:25:50 -0700 Subject: [PATCH 1/7] Fix hyperlink --- doc/source/development/contributing_codebase.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/development/contributing_codebase.rst b/doc/source/development/contributing_codebase.rst index 184060d3cf697..311120fc527d4 100644 --- a/doc/source/development/contributing_codebase.rst +++ b/doc/source/development/contributing_codebase.rst @@ -770,7 +770,7 @@ install pandas) by typing:: your installation is probably fine and you can start contributing! Often it is worth running only a subset of tests first around your changes before running the -entire suite (tip: you can use the [pandas-coverage app](https://pandas-coverage.herokuapp.com/) +entire suite (tip: you can use the [pandas-coverage app](https://pandas-coverage.herokuapp.com/)) to find out which tests hit the lines of code you've modified, and then run only those). The easiest way to do this is with:: From 3792cde47fb6ba1ca1865a3a8042a67339bf5433 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Fri, 12 May 2023 14:16:17 -0700 Subject: [PATCH 2/7] simplify is_hashable --- pandas/core/dtypes/inference.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/pandas/core/dtypes/inference.py b/pandas/core/dtypes/inference.py index af4f0a1c0aa05..0b938556b2381 100644 --- a/pandas/core/dtypes/inference.py +++ b/pandas/core/dtypes/inference.py @@ -356,19 +356,7 @@ def is_hashable(obj) -> TypeGuard[Hashable]: >>> is_hashable(a) False """ - # Unfortunately, we can't use isinstance(obj, collections.abc.Hashable), - # which can be faster than calling hash. That is because numpy scalars - # fail this test. - - # Reconsider this decision once this numpy bug is fixed: - # https://github.com/numpy/numpy/issues/5562 - - try: - hash(obj) - except TypeError: - return False - else: - return True + return isinstance(obj, abc.Hashable) def is_sequence(obj) -> bool: From f312e95f111a9452fd56c08b7672e5ee41d32fd0 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Mon, 15 May 2023 17:05:06 -0700 Subject: [PATCH 3/7] Remove unnecessary variable --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 549a6374246a0..999bba1f9f77f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,6 @@ jobs: image: ubuntu-2004:2022.04.1 resource_class: arm.large environment: - ENV_FILE: ci/deps/circle-38-arm64.yaml TRIGGER_SOURCE: << pipeline.trigger_source >> steps: - checkout From d6c6041f6fe900783eb9bd90ebc8a94d430014b0 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Mon, 22 May 2023 11:35:53 -0700 Subject: [PATCH 4/7] Add a conda forge --- doc/source/getting_started/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/getting_started/index.rst b/doc/source/getting_started/index.rst index abb3aad8dbd3e..d9cb1de14aded 100644 --- a/doc/source/getting_started/index.rst +++ b/doc/source/getting_started/index.rst @@ -24,7 +24,7 @@ Installation .. code-block:: bash - conda install pandas + conda install -c conda-forge pandas .. grid-item-card:: Prefer pip? :class-card: install-card From a4321564ed59927266bb9bbd0a57d2ae6dbcff3c Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Tue, 23 May 2023 10:50:40 -0700 Subject: [PATCH 5/7] Fix link rendering --- web/pandas/community/ecosystem.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pandas/community/ecosystem.md b/web/pandas/community/ecosystem.md index 60b043cf052ce..764b07cf6fd36 100644 --- a/web/pandas/community/ecosystem.md +++ b/web/pandas/community/ecosystem.md @@ -58,7 +58,7 @@ target values with cutoff times that can be used for supervised learning. STUMPY is a powerful and scalable Python library for modern time series analysis. At its core, STUMPY efficiently computes something called a -`matrix profile `__, +[matrix profile](https://stumpy.readthedocs.io/en/latest/Tutorial_The_Matrix_Profile.html), which can be used for a wide variety of time series data mining tasks. ## Visualization From 684bc1de1f074e74e546a16fd26b95eb07184c64 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Tue, 23 May 2023 10:55:35 -0700 Subject: [PATCH 6/7] Fix more links --- web/pandas/community/ecosystem.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/pandas/community/ecosystem.md b/web/pandas/community/ecosystem.md index 764b07cf6fd36..957a8d38b204c 100644 --- a/web/pandas/community/ecosystem.md +++ b/web/pandas/community/ecosystem.md @@ -177,7 +177,7 @@ D-Tale integrates seamlessly with Jupyter notebooks, Python terminals, Kaggle ### [hvplot](https://hvplot.holoviz.org/index.html) -hvPlot is a high-level plotting API for the PyData ecosystem built on `HoloViews `__. +hvPlot is a high-level plotting API for the PyData ecosystem built on [HoloViews](https://holoviews.org/). It can be loaded as a native pandas plotting backend via ```python @@ -207,8 +207,7 @@ are utilized by Jupyter Notebook for displaying (abbreviated) HTML or LaTeX tables. LaTeX output is properly escaped. (Note: HTML tables may or may not be compatible with non-HTML Jupyter output formats.) -See `Options and Settings ` and -`Available Options ` +See [Options and Settings](https://pandas.pydata.org/docs/user_guide/options.html) for pandas `display.` settings. ### [quantopian/qgrid](https://github.com/quantopian/qgrid) @@ -355,7 +354,7 @@ Rigorously tested, it is a complete replacement for ``df.to_sql``. ### [Deltalake](https://pypi.org/project/deltalake) Deltalake python package lets you access tables stored in -`Delta Lake `__ natively in Python without the need to use Spark or +[Delta Lake](https://delta.io/) natively in Python without the need to use Spark or JVM. It provides the ``delta_table.to_pyarrow_table().to_pandas()`` method to convert any Delta table into Pandas dataframe. @@ -510,8 +509,8 @@ assumptions about your datasets and check that they're *actually* true. ## Extension data types Pandas provides an interface for defining -`extension types ` to extend NumPy's type system. The following libraries -implement that interface to provide types not found in NumPy or pandas, +[extension types](https://pandas.pydata.org/docs/development/extending.html#extension-types) to extend NumPy's type system. +The following librariesimplement that interface to provide types not found in NumPy or pandas, which work well with pandas' data containers. ### [cyberpandas](https://cyberpandas.readthedocs.io/en/latest) @@ -540,7 +539,8 @@ Text Extensions for Pandas provides extension types to cover common data structu ## Accessors A directory of projects providing -`extension accessors `. This is for users to discover new accessors and for library +[extension accessors](https://pandas.pydata.org/docs/development/extending.html#registering-custom-accessors). +This is for users to discover new accessors and for library authors to coordinate on the namespace. | Library | Accessor | Classes | From af9dfad5f52ff6cec0e47d308209b057a0707708 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Tue, 23 May 2023 12:25:00 -0700 Subject: [PATCH 7/7] Revert "simplify is_hashable" This reverts commit 3792cde47fb6ba1ca1865a3a8042a67339bf5433. --- pandas/core/dtypes/inference.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pandas/core/dtypes/inference.py b/pandas/core/dtypes/inference.py index 0b938556b2381..af4f0a1c0aa05 100644 --- a/pandas/core/dtypes/inference.py +++ b/pandas/core/dtypes/inference.py @@ -356,7 +356,19 @@ def is_hashable(obj) -> TypeGuard[Hashable]: >>> is_hashable(a) False """ - return isinstance(obj, abc.Hashable) + # Unfortunately, we can't use isinstance(obj, collections.abc.Hashable), + # which can be faster than calling hash. That is because numpy scalars + # fail this test. + + # Reconsider this decision once this numpy bug is fixed: + # https://github.com/numpy/numpy/issues/5562 + + try: + hash(obj) + except TypeError: + return False + else: + return True def is_sequence(obj) -> bool: