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..eb14f75ab56f7 100644 --- a/pandas/core/strings/accessor.py +++ b/pandas/core/strings/accessor.py @@ -1547,40 +1547,40 @@ def slice(self, start=None, stop=None, step=None): Examples -------- - >>> s = pd.Series(["koala", "fox", "chameleon"]) + >>> s = pd.Series(["koala", "dog", "chameleon"]) >>> s 0 koala - 1 fox + 1 dog 2 chameleon dtype: object >>> s.str.slice(start=1) 0 oala - 1 ox + 1 og 2 hameleon dtype: object >>> s.str.slice(start=-1) 0 a - 1 x + 1 g 2 n dtype: object >>> s.str.slice(stop=2) 0 ko - 1 fo + 1 do 2 ch dtype: object >>> s.str.slice(step=2) 0 kaa - 1 fx + 1 dg 2 caeen dtype: object >>> s.str.slice(start=0, stop=5, step=3) 0 kl - 1 f + 1 d 2 cm dtype: object @@ -1588,7 +1588,7 @@ def slice(self, start=None, stop=None, step=None): >>> s.str[0:5:3] 0 kl - 1 f + 1 d 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