Skip to content

Commit e9c91f1

Browse files
authored
DOC: Remove repeated words and wrong /it's/ usage (#38047)
1 parent acdc94f commit e9c91f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+62
-64
lines changed

doc/source/development/policies.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ We will not introduce new deprecations in patch releases.
3535
Deprecations will only be enforced in **major** releases. For example, if a
3636
behavior is deprecated in pandas 1.2.0, it will continue to work, with a
3737
warning, for all releases in the 1.x series. The behavior will change and the
38-
deprecation removed in the next next major release (2.0.0).
38+
deprecation removed in the next major release (2.0.0).
3939

4040
.. note::
4141

doc/source/user_guide/dsintro.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ Data Classes as introduced in `PEP557 <https://www.python.org/dev/peps/pep-0557>
439439
can be passed into the DataFrame constructor.
440440
Passing a list of dataclasses is equivalent to passing a list of dictionaries.
441441

442-
Please be aware, that that all values in the list should be dataclasses, mixing
442+
Please be aware, that all values in the list should be dataclasses, mixing
443443
types in the list would result in a TypeError.
444444

445445
.. ipython:: python

doc/source/user_guide/integer_na.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ dtype if needed.
117117
# coerce when needed
118118
s + 0.01
119119
120-
These dtypes can operate as part of of ``DataFrame``.
120+
These dtypes can operate as part of ``DataFrame``.
121121

122122
.. ipython:: python
123123

doc/source/whatsnew/v0.12.0.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ Bug fixes
419419
~~~~~~~~~
420420

421421
- Plotting functions now raise a ``TypeError`` before trying to plot anything
422-
if the associated objects have have a dtype of ``object`` (:issue:`1818`,
422+
if the associated objects have a dtype of ``object`` (:issue:`1818`,
423423
:issue:`3572`, :issue:`3911`, :issue:`3912`), but they will try to convert object arrays to
424424
numeric arrays if possible so that you can still plot, for example, an
425425
object array with floats. This happens before any drawing takes place which
@@ -430,8 +430,8 @@ Bug fixes
430430

431431
- ``Series.str`` now supports iteration (:issue:`3638`). You can iterate over the
432432
individual elements of each string in the ``Series``. Each iteration yields
433-
yields a ``Series`` with either a single character at each index of the
434-
original ``Series`` or ``NaN``. For example,
433+
a ``Series`` with either a single character at each index of the original
434+
``Series`` or ``NaN``. For example,
435435

436436
.. ipython:: python
437437
:okwarning:

doc/source/whatsnew/v0.14.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ Bug fixes
923923
- ``HDFStore.select_as_multiple`` handles start and stop the same way as ``select`` (:issue:`6177`)
924924
- ``HDFStore.select_as_coordinates`` and ``select_column`` works with a ``where`` clause that results in filters (:issue:`6177`)
925925
- Regression in join of non_unique_indexes (:issue:`6329`)
926-
- Issue with groupby ``agg`` with a single function and a a mixed-type frame (:issue:`6337`)
926+
- Issue with groupby ``agg`` with a single function and a mixed-type frame (:issue:`6337`)
927927
- Bug in ``DataFrame.replace()`` when passing a non- ``bool``
928928
``to_replace`` argument (:issue:`6332`)
929929
- Raise when trying to align on different levels of a MultiIndex assignment (:issue:`3738`)

doc/source/whatsnew/v0.15.2.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Enhancements
136136

137137
- Added ability to export Categorical data to Stata (:issue:`8633`). See :ref:`here <io.stata-categorical>` for limitations of categorical variables exported to Stata data files.
138138
- Added flag ``order_categoricals`` to ``StataReader`` and ``read_stata`` to select whether to order imported categorical data (:issue:`8836`). See :ref:`here <io.stata-categorical>` for more information on importing categorical variables from Stata data files.
139-
- Added ability to export Categorical data to to/from HDF5 (:issue:`7621`). Queries work the same as if it was an object array. However, the ``category`` dtyped data is stored in a more efficient manner. See :ref:`here <io.hdf5-categorical>` for an example and caveats w.r.t. prior versions of pandas.
139+
- Added ability to export Categorical data to/from HDF5 (:issue:`7621`). Queries work the same as if it was an object array. However, the ``category`` dtyped data is stored in a more efficient manner. See :ref:`here <io.hdf5-categorical>` for an example and caveats w.r.t. prior versions of pandas.
140140
- Added support for ``searchsorted()`` on ``Categorical`` class (:issue:`8420`).
141141

142142
Other enhancements:

doc/source/whatsnew/v0.16.1.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Version 0.16.1 (May 11, 2015)
66
{{ header }}
77

88

9-
This is a minor bug-fix release from 0.16.0 and includes a a large number of
9+
This is a minor bug-fix release from 0.16.0 and includes a large number of
1010
bug fixes along several new features, enhancements, and performance improvements.
1111
We recommend that all users upgrade to this version.
1212

@@ -72,7 +72,7 @@ setting the index of a ``DataFrame/Series`` with a ``category`` dtype would conv
7272
Out[4]: Index(['c', 'a', 'b'], dtype='object')
7373
7474
75-
setting the index, will create create a ``CategoricalIndex``
75+
setting the index, will create a ``CategoricalIndex``
7676

7777
.. code-block:: ipython
7878

doc/source/whatsnew/v0.16.2.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Version 0.16.2 (June 12, 2015)
66
{{ header }}
77

88

9-
This is a minor bug-fix release from 0.16.1 and includes a a large number of
9+
This is a minor bug-fix release from 0.16.1 and includes a large number of
1010
bug fixes along some new features (:meth:`~DataFrame.pipe` method), enhancements, and performance improvements.
1111

1212
We recommend that all users upgrade to this version.

doc/source/whatsnew/v0.18.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ Subtraction by ``Timedelta`` in a ``Series`` by a ``Timestamp`` works (:issue:`1
610610
pd.Timestamp('2012-01-01') - ser
611611
612612
613-
``NaT.isoformat()`` now returns ``'NaT'``. This change allows allows
613+
``NaT.isoformat()`` now returns ``'NaT'``. This change allows
614614
``pd.Timestamp`` to rehydrate any timestamp like object from its isoformat
615615
(:issue:`12300`).
616616

doc/source/whatsnew/v0.20.0.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ Other API changes
11671167
- ``.loc`` has compat with ``.ix`` for accepting iterators, and NamedTuples (:issue:`15120`)
11681168
- ``interpolate()`` and ``fillna()`` will raise a ``ValueError`` if the ``limit`` keyword argument is not greater than 0. (:issue:`9217`)
11691169
- ``pd.read_csv()`` will now issue a ``ParserWarning`` whenever there are conflicting values provided by the ``dialect`` parameter and the user (:issue:`14898`)
1170-
- ``pd.read_csv()`` will now raise a ``ValueError`` for the C engine if the quote character is larger than than one byte (:issue:`11592`)
1170+
- ``pd.read_csv()`` will now raise a ``ValueError`` for the C engine if the quote character is larger than one byte (:issue:`11592`)
11711171
- ``inplace`` arguments now require a boolean value, else a ``ValueError`` is thrown (:issue:`14189`)
11721172
- ``pandas.api.types.is_datetime64_ns_dtype`` will now report ``True`` on a tz-aware dtype, similar to ``pandas.api.types.is_datetime64_any_dtype``
11731173
- ``DataFrame.asof()`` will return a null filled ``Series`` instead the scalar ``NaN`` if a match is not found (:issue:`15118`)
@@ -1663,11 +1663,11 @@ Indexing
16631663
- Bug in ``.reset_index()`` when an all ``NaN`` level of a ``MultiIndex`` would fail (:issue:`6322`)
16641664
- Bug in ``.reset_index()`` when raising error for index name already present in ``MultiIndex`` columns (:issue:`16120`)
16651665
- Bug in creating a ``MultiIndex`` with tuples and not passing a list of names; this will now raise ``ValueError`` (:issue:`15110`)
1666-
- Bug in the HTML display with with a ``MultiIndex`` and truncation (:issue:`14882`)
1666+
- Bug in the HTML display with a ``MultiIndex`` and truncation (:issue:`14882`)
16671667
- Bug in the display of ``.info()`` where a qualifier (+) would always be displayed with a ``MultiIndex`` that contains only non-strings (:issue:`15245`)
16681668
- Bug in ``pd.concat()`` where the names of ``MultiIndex`` of resulting ``DataFrame`` are not handled correctly when ``None`` is presented in the names of ``MultiIndex`` of input ``DataFrame`` (:issue:`15787`)
16691669
- Bug in ``DataFrame.sort_index()`` and ``Series.sort_index()`` where ``na_position`` doesn't work with a ``MultiIndex`` (:issue:`14784`, :issue:`16604`)
1670-
- Bug in in ``pd.concat()`` when combining objects with a ``CategoricalIndex`` (:issue:`16111`)
1670+
- Bug in ``pd.concat()`` when combining objects with a ``CategoricalIndex`` (:issue:`16111`)
16711671
- Bug in indexing with a scalar and a ``CategoricalIndex`` (:issue:`16123`)
16721672

16731673
IO

doc/source/whatsnew/v0.21.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Parquet is designed to faithfully serialize and de-serialize ``DataFrame`` s, su
5050
dtypes, including extension dtypes such as datetime with timezones.
5151

5252
This functionality depends on either the `pyarrow <http://arrow.apache.org/docs/python/>`__ or `fastparquet <https://fastparquet.readthedocs.io/en/latest/>`__ library.
53-
For more details, see see :ref:`the IO docs on Parquet <io.parquet>`.
53+
For more details, see :ref:`the IO docs on Parquet <io.parquet>`.
5454

5555

5656
.. _whatsnew_0210.enhancements.infer_objects:

doc/source/whatsnew/v0.24.0.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ Timedelta
16221622
- Bug in :class:`DataFrame` with ``timedelta64[ns]`` dtype division by ``Timedelta``-like scalar incorrectly returning ``timedelta64[ns]`` dtype instead of ``float64`` dtype (:issue:`20088`, :issue:`22163`)
16231623
- Bug in adding a :class:`Index` with object dtype to a :class:`Series` with ``timedelta64[ns]`` dtype incorrectly raising (:issue:`22390`)
16241624
- Bug in multiplying a :class:`Series` with numeric dtype against a ``timedelta`` object (:issue:`22390`)
1625-
- Bug in :class:`Series` with numeric dtype when adding or subtracting an an array or ``Series`` with ``timedelta64`` dtype (:issue:`22390`)
1625+
- Bug in :class:`Series` with numeric dtype when adding or subtracting an array or ``Series`` with ``timedelta64`` dtype (:issue:`22390`)
16261626
- Bug in :class:`Index` with numeric dtype when multiplying or dividing an array with dtype ``timedelta64`` (:issue:`22390`)
16271627
- Bug in :class:`TimedeltaIndex` incorrectly allowing indexing with ``Timestamp`` object (:issue:`20464`)
16281628
- Fixed bug where subtracting :class:`Timedelta` from an object-dtyped array would raise ``TypeError`` (:issue:`21980`)
@@ -1868,7 +1868,7 @@ Reshaping
18681868
- :func:`pandas.core.groupby.GroupBy.rank` now raises a ``ValueError`` when an invalid value is passed for argument ``na_option`` (:issue:`22124`)
18691869
- Bug in :func:`get_dummies` with Unicode attributes in Python 2 (:issue:`22084`)
18701870
- Bug in :meth:`DataFrame.replace` raises ``RecursionError`` when replacing empty lists (:issue:`22083`)
1871-
- Bug in :meth:`Series.replace` and :meth:`DataFrame.replace` when dict is used as the ``to_replace`` value and one key in the dict is is another key's value, the results were inconsistent between using integer key and using string key (:issue:`20656`)
1871+
- Bug in :meth:`Series.replace` and :meth:`DataFrame.replace` when dict is used as the ``to_replace`` value and one key in the dict is another key's value, the results were inconsistent between using integer key and using string key (:issue:`20656`)
18721872
- Bug in :meth:`DataFrame.drop_duplicates` for empty ``DataFrame`` which incorrectly raises an error (:issue:`20516`)
18731873
- Bug in :func:`pandas.wide_to_long` when a string is passed to the stubnames argument and a column name is a substring of that stubname (:issue:`22468`)
18741874
- Bug in :func:`merge` when merging ``datetime64[ns, tz]`` data that contained a DST transition (:issue:`18885`)

doc/source/whatsnew/v0.6.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ New features
1515
~~~~~~~~~~~~
1616
- :ref:`Added <reshaping.melt>` ``melt`` function to ``pandas.core.reshape``
1717
- :ref:`Added <groupby.multiindex>` ``level`` parameter to group by level in Series and DataFrame descriptive statistics (:issue:`313`)
18-
- :ref:`Added <basics.head_tail>` ``head`` and ``tail`` methods to Series, analogous to to DataFrame (:issue:`296`)
18+
- :ref:`Added <basics.head_tail>` ``head`` and ``tail`` methods to Series, analogous to DataFrame (:issue:`296`)
1919
- :ref:`Added <indexing.boolean>` ``Series.isin`` function which checks if each value is contained in a passed sequence (:issue:`289`)
2020
- :ref:`Added <io.formatting>` ``float_format`` option to ``Series.to_string``
2121
- :ref:`Added <io.parse_dates>` ``skip_footer`` (:issue:`291`) and ``converters`` (:issue:`343`) options to ``read_csv`` and ``read_table``

doc/source/whatsnew/v0.8.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Time Series changes and improvements
8181
timestamps are stored as UTC; Timestamps from DatetimeIndex objects with time
8282
zone set will be localized to local time. Time zone conversions are therefore
8383
essentially free. User needs to know very little about pytz library now; only
84-
time zone names as as strings are required. Time zone-aware timestamps are
84+
time zone names as strings are required. Time zone-aware timestamps are
8585
equal if and only if their UTC timestamps match. Operations between time
8686
zone-aware time series with different time zones will result in a UTC-indexed
8787
time series.

pandas/_testing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,7 @@ def box_expected(expected, box_cls, transpose=True):
17681768
elif box_cls is pd.DataFrame:
17691769
expected = pd.Series(expected).to_frame()
17701770
if transpose:
1771-
# for vector operations, we we need a DataFrame to be a single-row,
1771+
# for vector operations, we need a DataFrame to be a single-row,
17721772
# not a single-column, in order to operate against non-DataFrame
17731773
# vectors of the same length.
17741774
expected = expected.T

pandas/core/algorithms.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ def isin(comps: AnyArrayLike, values: AnyArrayLike) -> np.ndarray:
458458
# Albeit hashmap has O(1) look-up (vs. O(logn) in sorted array),
459459
# in1d is faster for small sizes
460460
if len(comps) > 1_000_000 and len(values) <= 26 and not is_object_dtype(comps):
461-
# If the the values include nan we need to check for nan explicitly
461+
# If the values include nan we need to check for nan explicitly
462462
# since np.nan it not equal to np.nan
463463
if isna(values).any():
464464
f = lambda c, v: np.logical_or(np.in1d(c, v), np.isnan(c))
@@ -1563,7 +1563,7 @@ def take(arr, indices, axis: int = 0, allow_fill: bool = False, fill_value=None)
15631563
15641564
* True: negative values in `indices` indicate
15651565
missing values. These values are set to `fill_value`. Any other
1566-
other negative values raise a ``ValueError``.
1566+
negative values raise a ``ValueError``.
15671567
15681568
fill_value : any, optional
15691569
Fill value to use for NA-indices when `allow_fill` is True.

pandas/core/arrays/categorical.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def func(self, other):
7777
"Unordered Categoricals can only compare equality or not"
7878
)
7979
if isinstance(other, Categorical):
80-
# Two Categoricals can only be be compared if the categories are
80+
# Two Categoricals can only be compared if the categories are
8181
# the same (maybe up to ordering, depending on ordered)
8282

8383
msg = "Categoricals can only be compared if 'categories' are the same."

pandas/core/arrays/floating.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def coerce_to_array(
120120
-------
121121
tuple of (values, mask)
122122
"""
123-
# if values is floating numpy array, preserve it's dtype
123+
# if values is floating numpy array, preserve its dtype
124124
if dtype is None and hasattr(values, "dtype"):
125125
if is_float_dtype(values.dtype):
126126
dtype = values.dtype

pandas/core/arrays/integer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def coerce_to_array(
183183
-------
184184
tuple of (values, mask)
185185
"""
186-
# if values is integer numpy array, preserve it's dtype
186+
# if values is integer numpy array, preserve its dtype
187187
if dtype is None and hasattr(values, "dtype"):
188188
if is_integer_dtype(values.dtype):
189189
dtype = values.dtype

pandas/core/arrays/numpy_.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class PandasArray(
144144

145145
# If you're wondering why pd.Series(cls) doesn't put the array in an
146146
# ExtensionBlock, search for `ABCPandasArray`. We check for
147-
# that _typ to ensure that that users don't unnecessarily use EAs inside
147+
# that _typ to ensure that users don't unnecessarily use EAs inside
148148
# pandas internals, which turns off things like block consolidation.
149149
_typ = "npy_extension"
150150
__array_priority__ = 1000

pandas/core/dtypes/base.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,8 @@ def __eq__(self, other: Any) -> bool:
9999
By default, 'other' is considered equal if either
100100
101101
* it's a string matching 'self.name'.
102-
* it's an instance of this type and all of the
103-
the attributes in ``self._metadata`` are equal between
104-
`self` and `other`.
102+
* it's an instance of this type and all of the attributes
103+
in ``self._metadata`` are equal between `self` and `other`.
105104
106105
Parameters
107106
----------

pandas/core/dtypes/cast.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def maybe_cast_to_extension_array(
391391
assertion_msg = f"must pass a subclass of ExtensionArray: {cls}"
392392
assert issubclass(cls, ABCExtensionArray), assertion_msg
393393

394-
# Everything can be be converted to StringArrays, but we may not want to convert
394+
# Everything can be converted to StringArrays, but we may not want to convert
395395
if (
396396
issubclass(cls, (StringArray, ArrowStringArray))
397397
and lib.infer_dtype(obj) != "string"
@@ -1200,7 +1200,7 @@ def soft_convert_objects(
12001200
elif conversion_count > 1 and coerce:
12011201
raise ValueError(
12021202
"Only one of 'datetime', 'numeric' or "
1203-
"'timedelta' can be True when when coerce=True."
1203+
"'timedelta' can be True when coerce=True."
12041204
)
12051205

12061206
if not is_object_dtype(values.dtype):

pandas/core/dtypes/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,7 @@ def _validate_date_like_dtype(dtype) -> None:
17271727
------
17281728
TypeError : The dtype could not be casted to a date-like dtype.
17291729
ValueError : The dtype is an illegal date-like dtype (e.g. the
1730-
the frequency provided is too specific)
1730+
frequency provided is too specific)
17311731
"""
17321732
try:
17331733
typ = np.datetime_data(dtype)[0]

pandas/core/dtypes/dtypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class PandasExtensionDtype(ExtensionDtype):
4747
type: Any
4848
kind: Any
4949
# The Any type annotations above are here only because mypy seems to have a
50-
# problem dealing with with multiple inheritance from PandasExtensionDtype
50+
# problem dealing with multiple inheritance from PandasExtensionDtype
5151
# and ExtensionDtype's @properties in the subclasses below. The kind and
5252
# type variables in those subclasses are explicitly typed below.
5353
subdtype = None

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6532,7 +6532,7 @@ def update(
65326532
1 b e
65336533
2 c f
65346534
6535-
For Series, it's name attribute must be set.
6535+
For Series, its name attribute must be set.
65366536
65376537
>>> df = pd.DataFrame({'A': ['a', 'b', 'c'],
65386538
... 'B': ['x', 'y', 'z']})

pandas/core/generic.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ def rename_axis(self, mapper=lib.no_default, **kwargs):
11141114
In this case, the parameter ``copy`` is ignored.
11151115
11161116
The second calling convention will modify the names of the
1117-
the corresponding index if mapper is a list or a scalar.
1117+
corresponding index if mapper is a list or a scalar.
11181118
However, if mapper is dict-like or a function, it will use the
11191119
deprecated behavior of modifying the axis *labels*.
11201120
@@ -2722,7 +2722,7 @@ def to_sql(
27222722
>>> engine.execute("SELECT * FROM users").fetchall()
27232723
[(0, 'User 1'), (1, 'User 2'), (2, 'User 3')]
27242724
2725-
An `sqlalchemy.engine.Connection` can also be passed to to `con`:
2725+
An `sqlalchemy.engine.Connection` can also be passed to `con`:
27262726
27272727
>>> with engine.begin() as connection:
27282728
... df1 = pd.DataFrame({'name' : ['User 4', 'User 5']})
@@ -5490,7 +5490,7 @@ def __setattr__(self, name: str, value) -> None:
54905490
def _dir_additions(self) -> Set[str]:
54915491
"""
54925492
add the string-like attributes from the info_axis.
5493-
If info_axis is a MultiIndex, it's first level values are used.
5493+
If info_axis is a MultiIndex, its first level values are used.
54945494
"""
54955495
additions = super()._dir_additions()
54965496
if self._info_axis._can_hold_strings:

pandas/core/groupby/generic.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def aggregate(self, func=None, *args, engine=None, engine_kwargs=None, **kwargs)
262262
return self._python_agg_general(func, *args, **kwargs)
263263
except (ValueError, KeyError):
264264
# TODO: KeyError is raised in _python_agg_general,
265-
# see see test_groupby.test_basic
265+
# see test_groupby.test_basic
266266
result = self._aggregate_named(func, *args, **kwargs)
267267

268268
index = Index(sorted(result), name=self.grouper.names[0])
@@ -1390,8 +1390,7 @@ def _transform_fast(self, result: DataFrame) -> DataFrame:
13901390
"""
13911391
obj = self._obj_with_exclusions
13921392

1393-
# for each col, reshape to to size of original frame
1394-
# by take operation
1393+
# for each col, reshape to size of original frame by take operation
13951394
ids, _, ngroup = self.grouper.group_info
13961395
result = result.reindex(self.grouper.result_index, copy=False)
13971396
output = [

0 commit comments

Comments
 (0)