From b59147f83426b214c614508602616e94d234ae23 Mon Sep 17 00:00:00 2001 From: Yulv-git Date: Sat, 14 May 2022 20:40:02 +0800 Subject: [PATCH] Fix some typos in pandas/. --- pandas/_libs/src/ujson/lib/ultrajson.h | 2 +- pandas/_libs/src/ujson/lib/ultrajsondec.c | 2 +- pandas/_libs/src/ujson/lib/ultrajsonenc.c | 2 +- pandas/_libs/src/ujson/python/JSONtoObj.c | 2 +- pandas/_libs/src/ujson/python/objToJSON.c | 2 +- pandas/_libs/src/ujson/python/ujson.c | 2 +- pandas/_libs/src/ujson/python/version.h | 2 +- pandas/core/array_algos/putmask.py | 2 +- pandas/core/indexes/multi.py | 2 +- pandas/core/internals/managers.py | 2 +- pandas/tests/indexes/multi/conftest.py | 2 +- pandas/tests/indexing/test_iloc.py | 2 +- pandas/tests/io/formats/style/test_matplotlib.py | 4 ++-- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pandas/_libs/src/ujson/lib/ultrajson.h b/pandas/_libs/src/ujson/lib/ultrajson.h index 5b5995a671b2c..71df0c5a186b7 100644 --- a/pandas/_libs/src/ujson/lib/ultrajson.h +++ b/pandas/_libs/src/ujson/lib/ultrajson.h @@ -29,7 +29,7 @@ Portions of code from MODP_ASCII - Ascii transformations (upper/lower, etc) https://github.com/client9/stringencoders Copyright (c) 2007 Nick Galbreath -- nickg [at] modp [dot] com. All rights reserved. -Numeric decoder derived from from TCL library +Numeric decoder derived from TCL library https://www.opensource.apple.com/source/tcl/tcl-14/tcl/license.terms * Copyright (c) 1988-1993 The Regents of the University of California. * Copyright (c) 1994 Sun Microsystems, Inc. diff --git a/pandas/_libs/src/ujson/lib/ultrajsondec.c b/pandas/_libs/src/ujson/lib/ultrajsondec.c index fee552672b8b6..c7779b8b428ae 100644 --- a/pandas/_libs/src/ujson/lib/ultrajsondec.c +++ b/pandas/_libs/src/ujson/lib/ultrajsondec.c @@ -32,7 +32,7 @@ Portions of code from MODP_ASCII - Ascii transformations (upper/lower, etc) Copyright (c) 2007 Nick Galbreath -- nickg [at] modp [dot] com. All rights reserved. -Numeric decoder derived from from TCL library +Numeric decoder derived from TCL library https://www.opensource.apple.com/source/tcl/tcl-14/tcl/license.terms * Copyright (c) 1988-1993 The Regents of the University of California. * Copyright (c) 1994 Sun Microsystems, Inc. diff --git a/pandas/_libs/src/ujson/lib/ultrajsonenc.c b/pandas/_libs/src/ujson/lib/ultrajsonenc.c index 4469631b7b3f7..5d90710441a94 100644 --- a/pandas/_libs/src/ujson/lib/ultrajsonenc.c +++ b/pandas/_libs/src/ujson/lib/ultrajsonenc.c @@ -32,7 +32,7 @@ Portions of code from MODP_ASCII - Ascii transformations (upper/lower, etc) Copyright (c) 2007 Nick Galbreath -- nickg [at] modp [dot] com. All rights reserved. -Numeric decoder derived from from TCL library +Numeric decoder derived from TCL library https://www.opensource.apple.com/source/tcl/tcl-14/tcl/license.terms * Copyright (c) 1988-1993 The Regents of the University of California. * Copyright (c) 1994 Sun Microsystems, Inc. diff --git a/pandas/_libs/src/ujson/python/JSONtoObj.c b/pandas/_libs/src/ujson/python/JSONtoObj.c index 14683f4c28cbe..c58f25b8f99ea 100644 --- a/pandas/_libs/src/ujson/python/JSONtoObj.c +++ b/pandas/_libs/src/ujson/python/JSONtoObj.c @@ -29,7 +29,7 @@ Portions of code from MODP_ASCII - Ascii transformations (upper/lower, etc) https://github.com/client9/stringencoders Copyright (c) 2007 Nick Galbreath -- nickg [at] modp [dot] com. All rights reserved. -Numeric decoder derived from from TCL library +Numeric decoder derived from TCL library https://www.opensource.apple.com/source/tcl/tcl-14/tcl/license.terms * Copyright (c) 1988-1993 The Regents of the University of California. * Copyright (c) 1994 Sun Microsystems, Inc. diff --git a/pandas/_libs/src/ujson/python/objToJSON.c b/pandas/_libs/src/ujson/python/objToJSON.c index 7de47749e500c..73d2a1f786f8b 100644 --- a/pandas/_libs/src/ujson/python/objToJSON.c +++ b/pandas/_libs/src/ujson/python/objToJSON.c @@ -30,7 +30,7 @@ Portions of code from MODP_ASCII - Ascii transformations (upper/lower, etc) Copyright (c) 2007 Nick Galbreath -- nickg [at] modp [dot] com. All rights reserved. -Numeric decoder derived from from TCL library +Numeric decoder derived from TCL library https://www.opensource.apple.com/source/tcl/tcl-14/tcl/license.terms * Copyright (c) 1988-1993 The Regents of the University of California. * Copyright (c) 1994 Sun Microsystems, Inc. diff --git a/pandas/_libs/src/ujson/python/ujson.c b/pandas/_libs/src/ujson/python/ujson.c index a8fdb4f55bfca..def06cdf2db84 100644 --- a/pandas/_libs/src/ujson/python/ujson.c +++ b/pandas/_libs/src/ujson/python/ujson.c @@ -29,7 +29,7 @@ Portions of code from MODP_ASCII - Ascii transformations (upper/lower, etc) https://github.com/client9/stringencoders Copyright (c) 2007 Nick Galbreath -- nickg [at] modp [dot] com. All rights reserved. -Numeric decoder derived from from TCL library +Numeric decoder derived from TCL library https://www.opensource.apple.com/source/tcl/tcl-14/tcl/license.terms * Copyright (c) 1988-1993 The Regents of the University of California. * Copyright (c) 1994 Sun Microsystems, Inc. diff --git a/pandas/_libs/src/ujson/python/version.h b/pandas/_libs/src/ujson/python/version.h index 3f38642b6df87..15c55309d6270 100644 --- a/pandas/_libs/src/ujson/python/version.h +++ b/pandas/_libs/src/ujson/python/version.h @@ -29,7 +29,7 @@ Portions of code from MODP_ASCII - Ascii transformations (upper/lower, etc) https://github.com/client9/stringencoders Copyright (c) 2007 Nick Galbreath -- nickg [at] modp [dot] com. All rights reserved. -Numeric decoder derived from from TCL library +Numeric decoder derived from TCL library https://www.opensource.apple.com/source/tcl/tcl-14/tcl/license.terms * Copyright (c) 1988-1993 The Regents of the University of California. * Copyright (c) 1994 Sun Microsystems, Inc. diff --git a/pandas/core/array_algos/putmask.py b/pandas/core/array_algos/putmask.py index d2e6b6e935ed5..84160344437b5 100644 --- a/pandas/core/array_algos/putmask.py +++ b/pandas/core/array_algos/putmask.py @@ -1,5 +1,5 @@ """ -EA-compatible analogue to to np.putmask +EA-compatible analogue to np.putmask """ from __future__ import annotations diff --git a/pandas/core/indexes/multi.py b/pandas/core/indexes/multi.py index e015a3e5a941a..752ce28c58f55 100644 --- a/pandas/core/indexes/multi.py +++ b/pandas/core/indexes/multi.py @@ -720,7 +720,7 @@ def _values(self) -> np.ndarray: if isinstance(vals, ABCDatetimeIndex): # TODO: this can be removed after Timestamp.freq is removed # The astype(object) below does not remove the freq from - # the underlying Timestamps so we remove it here to to match + # the underlying Timestamps so we remove it here to match # the behavior of self._get_level_values vals = vals.copy() vals.freq = None diff --git a/pandas/core/internals/managers.py b/pandas/core/internals/managers.py index ded525cd099fc..2e638f5b0fb3d 100644 --- a/pandas/core/internals/managers.py +++ b/pandas/core/internals/managers.py @@ -1892,7 +1892,7 @@ def create_block_manager_from_blocks( # If verify_integrity=False, then caller is responsible for checking # all(x.shape[-1] == len(axes[1]) for x in blocks) # sum(x.shape[0] for x in blocks) == len(axes[0]) - # set(x for for blk in blocks for x in blk.mgr_locs) == set(range(len(axes[0]))) + # set(x for blk in blocks for x in blk.mgr_locs) == set(range(len(axes[0]))) # all(blk.ndim == 2 for blk in blocks) # This allows us to safely pass verify_integrity=False diff --git a/pandas/tests/indexes/multi/conftest.py b/pandas/tests/indexes/multi/conftest.py index 9d0a2fa81b53b..3cc4fa4713831 100644 --- a/pandas/tests/indexes/multi/conftest.py +++ b/pandas/tests/indexes/multi/conftest.py @@ -8,7 +8,7 @@ ) -# Note: identical the the "multi" entry in the top-level "index" fixture +# Note: identical the "multi" entry in the top-level "index" fixture @pytest.fixture def idx(): # a MultiIndex used to test the general functionality of the diff --git a/pandas/tests/indexing/test_iloc.py b/pandas/tests/indexing/test_iloc.py index 426192ab46914..19ea6753c616c 100644 --- a/pandas/tests/indexing/test_iloc.py +++ b/pandas/tests/indexing/test_iloc.py @@ -1180,7 +1180,7 @@ def test_iloc_getitem_int_single_ea_block_view(self): arr = interval_range(1, 10.0)._values df = DataFrame(arr) - # ser should be a *view* on the the DataFrame data + # ser should be a *view* on the DataFrame data ser = df.iloc[2] # if we have a view, then changing arr[2] should also change ser[0] diff --git a/pandas/tests/io/formats/style/test_matplotlib.py b/pandas/tests/io/formats/style/test_matplotlib.py index a350b6fe7546d..8d9f075d8674d 100644 --- a/pandas/tests/io/formats/style/test_matplotlib.py +++ b/pandas/tests/io/formats/style/test_matplotlib.py @@ -216,7 +216,7 @@ def test_background_gradient_gmap_array_raises(gmap, axis): ], ) def test_background_gradient_gmap_dataframe_align(styler_blank, gmap, subset, exp_gmap): - # test gmap given as DataFrame that it aligns to the the data including subset + # test gmap given as DataFrame that it aligns to the data including subset expected = styler_blank.background_gradient(axis=None, gmap=exp_gmap, subset=subset) result = styler_blank.background_gradient(axis=None, gmap=gmap, subset=subset) assert expected._compute().ctx == result._compute().ctx @@ -232,7 +232,7 @@ def test_background_gradient_gmap_dataframe_align(styler_blank, gmap, subset, ex ], ) def test_background_gradient_gmap_series_align(styler_blank, gmap, axis, exp_gmap): - # test gmap given as Series that it aligns to the the data including subset + # test gmap given as Series that it aligns to the data including subset expected = styler_blank.background_gradient(axis=None, gmap=exp_gmap)._compute() result = styler_blank.background_gradient(axis=axis, gmap=gmap)._compute() assert expected.ctx == result.ctx