You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/development/contributing.rst
+7-7
Original file line number
Diff line number
Diff line change
@@ -146,7 +146,7 @@ requires a C compiler and Python environment. If you're making documentation
146
146
changes, you can skip to :ref:`contributing.documentation` but you won't be able
147
147
to build the documentation locally before pushing your changes.
148
148
149
-
Using a Docker Container
149
+
Using a Docker container
150
150
~~~~~~~~~~~~~~~~~~~~~~~~
151
151
152
152
Instead of manually setting up a development environment, you can use Docker to
@@ -754,7 +754,7 @@ You can then verify the changes look ok, then git :ref:`commit <contributing.com
754
754
755
755
.. _contributing.pre-commit:
756
756
757
-
Pre-Commit
757
+
Pre-commit
758
758
~~~~~~~~~~
759
759
760
760
You can run many of these styling checks manually as we have described above. However,
@@ -822,12 +822,12 @@ See :ref:`contributing.warnings` for more.
822
822
823
823
.. _contributing.type_hints:
824
824
825
-
Type Hints
825
+
Type hints
826
826
----------
827
827
828
828
*pandas* strongly encourages the use of :pep:`484` style type hints. New development should contain type hints and pull requests to annotate existing code are accepted as well!
829
829
830
-
Style Guidelines
830
+
Style guidelines
831
831
~~~~~~~~~~~~~~~~
832
832
833
833
Types imports should follow the ``from typing import ...`` convention. So rather than
@@ -903,7 +903,7 @@ The limitation here is that while a human can reasonably understand that ``is_nu
903
903
904
904
With custom types and inference this is not always possible so exceptions are made, but every effort should be exhausted to avoid ``cast`` before going down such paths.
905
905
906
-
Pandas-specific Types
906
+
pandas-specific types
907
907
~~~~~~~~~~~~~~~~~~~~~
908
908
909
909
Commonly used types specific to *pandas* will appear in `pandas._typing <https://github.com/pandas-dev/pandas/blob/master/pandas/_typing.py>`_ and you should use these where applicable. This module is private for now but ultimately this should be exposed to third party libraries who want to implement type checking against pandas.
@@ -919,7 +919,7 @@ For example, quite a few functions in *pandas* accept a ``dtype`` argument. This
919
919
920
920
This module will ultimately house types for repeatedly used concepts like "path-like", "array-like", "numeric", etc... and can also hold aliases for commonly appearing parameters like `axis`. Development of this module is active so be sure to refer to the source for the most up to date list of available types.
921
921
922
-
Validating Type Hints
922
+
Validating type hints
923
923
~~~~~~~~~~~~~~~~~~~~~
924
924
925
925
*pandas* uses `mypy <http://mypy-lang.org>`_ to statically analyze the code base and type hints. After making any change you can ensure your type hints are correct by running
@@ -1539,7 +1539,7 @@ The branch will still exist on GitHub, so to delete it there do::
1539
1539
.. _Gitter: https://gitter.im/pydata/pandas
1540
1540
1541
1541
1542
-
Tips for a successful Pull Request
1542
+
Tips for a successful pull request
1543
1543
==================================
1544
1544
1545
1545
If you have made it to the `Review your code`_ phase, one of the core contributors may
@@ -91,6 +92,8 @@ Backwards incompatible API changes
91
92
now raise a ``TypeError`` if a not-accepted keyword argument is passed into it.
92
93
Previously a ``UnsupportedFunctionCall`` was raised (``AssertionError`` if ``min_count`` passed into :meth:`~DataFrameGroupby.median``) (:issue:`31485`)
93
94
- :meth:`DataFrame.at` and :meth:`Series.at` will raise a ``TypeError`` instead of a ``ValueError`` if an incompatible key is passed, and ``KeyError`` if a missing key is passed, matching the behavior of ``.loc[]`` (:issue:`31722`)
95
+
- Passing an integer dtype other than ``int64`` to ``np.array(period_index, dtype=...)`` will now raise ``TypeError`` instead of incorrectly using ``int64`` (:issue:`32255`)
- Lookups on a :class:`Series` with a single-item list containing a slice (e.g. ``ser[[slice(0, 4)]]``) are deprecated, will raise in a future version. Either convert the list to tuple, or pass the slice directly instead (:issue:`31333`)
172
175
- :meth:`DataFrame.mean` and :meth:`DataFrame.median` with ``numeric_only=None`` will include datetime64 and datetime64tz columns in a future version (:issue:`29941`)
173
-
-
176
+
- Setting values with ``.loc`` using a positional slice is deprecated and will raise in a future version. Use ``.loc`` with labels or ``.iloc`` with positions instead (:issue:`31840`)
0 commit comments