diff --git a/pandas/core/arrays/sparse/accessor.py b/pandas/core/arrays/sparse/accessor.py index 12f29faab9574..c0bc88dc54e43 100644 --- a/pandas/core/arrays/sparse/accessor.py +++ b/pandas/core/arrays/sparse/accessor.py @@ -333,18 +333,18 @@ def to_coo(self): if isinstance(dtype, SparseDtype): dtype = dtype.subtype - cols, rows, datas = [], [], [] + cols, rows, data = [], [], [] for col, name in enumerate(self._parent): s = self._parent[name] row = s.array.sp_index.to_int_index().indices cols.append(np.repeat(col, len(row))) rows.append(row) - datas.append(s.array.sp_values.astype(dtype, copy=False)) + data.append(s.array.sp_values.astype(dtype, copy=False)) cols = np.concatenate(cols) rows = np.concatenate(rows) - datas = np.concatenate(datas) - return coo_matrix((datas, (rows, cols)), shape=self._parent.shape) + data = np.concatenate(data) + return coo_matrix((data, (rows, cols)), shape=self._parent.shape) @property def density(self) -> float: diff --git a/pandas/core/strings/accessor.py b/pandas/core/strings/accessor.py index 339ad2653fcfb..b4169c372b056 100644 --- a/pandas/core/strings/accessor.py +++ b/pandas/core/strings/accessor.py @@ -1547,10 +1547,10 @@ def slice(self, start=None, stop=None, step=None): Examples -------- - >>> s = pd.Series(["koala", "fox", "chameleon"]) + >>> s = pd.Series(["koala", "nox", "chameleon"]) >>> s 0 koala - 1 fox + 1 nox 2 chameleon dtype: object @@ -1568,19 +1568,19 @@ def slice(self, start=None, stop=None, step=None): >>> s.str.slice(stop=2) 0 ko - 1 fo + 1 no 2 ch dtype: object >>> s.str.slice(step=2) 0 kaa - 1 fx + 1 nx 2 caeen dtype: object >>> s.str.slice(start=0, stop=5, step=3) 0 kl - 1 f + 1 n 2 cm dtype: object diff --git a/setup.cfg b/setup.cfg index 56b2fa190ac99..226f5353d8afc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -64,7 +64,7 @@ filterwarnings = junit_family=xunit2 [codespell] -ignore-words-list=ba,blocs,coo,datas,fo,hist,nd,ser +ignore-words-list=ba,blocs,coo,hist,nd,ser [coverage:run] branch = False