Skip to content

Commit 4357621

Browse files
authored
STY: Enable ruff ambiguous unicode character (#54330)
1 parent e8961f1 commit 4357621

File tree

25 files changed

+49
-46
lines changed

25 files changed

+49
-46
lines changed

pandas/core/frame.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7131,7 +7131,7 @@ def value_counts(
71317131
ascending : bool, default False
71327132
Sort in ascending order.
71337133
dropna : bool, default True
7134-
Dont include counts of rows that contain NA values.
7134+
Don't include counts of rows that contain NA values.
71357135
71367136
.. versionadded:: 1.3.0
71377137
@@ -9968,7 +9968,7 @@ def map(
99689968
func : callable
99699969
Python function, returns a single value from a single value.
99709970
na_action : {None, 'ignore'}, default None
9971-
If ignore, propagate NaN values, without passing them to func.
9971+
If 'ignore', propagate NaN values, without passing them to func.
99729972
**kwargs
99739973
Additional keyword arguments to pass as keywords arguments to
99749974
`func`.
@@ -10054,7 +10054,7 @@ def applymap(
1005410054
func : callable
1005510055
Python function, returns a single value from a single value.
1005610056
na_action : {None, 'ignore'}, default None
10057-
If ignore, propagate NaN values, without passing them to func.
10057+
If 'ignore', propagate NaN values, without passing them to func.
1005810058
**kwargs
1005910059
Additional keyword arguments to pass as keywords arguments to
1006010060
`func`.

pandas/core/generic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5633,7 +5633,7 @@ def filter(
56335633
Keep labels from axis for which "like in label == True".
56345634
regex : str (regular expression)
56355635
Keep labels from axis for which re.search(regex, label) == True.
5636-
axis : {0 or index, 1 or columns, None}, default None
5636+
axis : {0 or 'index', 1 or 'columns', None}, default None
56375637
The axis to filter on, expressed either as an index (int)
56385638
or axis name (str). By default this is the info axis, 'columns' for
56395639
DataFrame. For `Series` this parameter is unused and defaults to `None`.
@@ -5922,7 +5922,7 @@ def sample(
59225922
59235923
np.random.Generator objects now accepted
59245924
5925-
axis : {0 or index, 1 or columns, None}, default None
5925+
axis : {0 or 'index', 1 or 'columns', None}, default None
59265926
Axis to sample. Accepts axis number or name. Default is stat axis
59275927
for given data type. For `Series` this parameter is unused and defaults to `None`.
59285928
ignore_index : bool, default False

pandas/core/groupby/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2322,7 +2322,7 @@ def value_counts(
23222322
ascending : bool, default False
23232323
Sort in ascending order.
23242324
dropna : bool, default True
2325-
Dont include counts of rows that contain NA values.
2325+
Don't include counts of rows that contain NA values.
23262326
23272327
Returns
23282328
-------

pandas/core/indexes/datetimes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class DatetimeIndex(DatetimeTimedeltaMixin):
177177
yearfirst : bool, default False
178178
If True parse dates in `data` with the year first order.
179179
dtype : numpy.dtype or DatetimeTZDtype or str, default None
180-
Note that the only NumPy dtype allowed is datetime64[ns].
180+
Note that the only NumPy dtype allowed is `datetime64[ns]`.
181181
copy : bool, default False
182182
Make a copy of input ndarray.
183183
name : label, default None

pandas/core/reshape/merge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2336,7 +2336,7 @@ def _factorize_keys(
23362336
sort : bool, defaults to True
23372337
If True, the encoding is done such that the unique elements in the
23382338
keys are sorted.
2339-
how : {left’, ‘right’, ‘outer’, ‘inner}, default inner
2339+
how : {'left', 'right', 'outer', 'inner'}, default 'inner'
23402340
Type of merge.
23412341
23422342
Returns

pandas/core/tools/datetimes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ def to_datetime(
916916
- **DataFrame/dict-like** are converted to :class:`Series` with
917917
:class:`datetime64` dtype. For each row a datetime is created from assembling
918918
the various dataframe columns. Column keys can be common abbreviations
919-
like [year’, ‘month’, ‘day’, ‘minute’, ‘second’, ‘ms’, ‘us’, ‘ns’]) or
919+
like ['year', 'month', 'day', 'minute', 'second', 'ms', 'us', 'ns']) or
920920
plurals of the same.
921921
922922
The following causes are responsible for :class:`datetime.datetime` objects

pandas/io/excel/_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,14 +1268,14 @@ def __init__(
12681268
@property
12691269
def date_format(self) -> str:
12701270
"""
1271-
Format string for dates written into Excel files (e.g. YYYY-MM-DD).
1271+
Format string for dates written into Excel files (e.g. 'YYYY-MM-DD').
12721272
"""
12731273
return self._date_format
12741274

12751275
@property
12761276
def datetime_format(self) -> str:
12771277
"""
1278-
Format string for dates written into Excel files (e.g. YYYY-MM-DD).
1278+
Format string for dates written into Excel files (e.g. 'YYYY-MM-DD').
12791279
"""
12801280
return self._datetime_format
12811281

pandas/io/formats/html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def render(self) -> list[str]:
9494
self._write_table()
9595

9696
if self.should_show_dimensions:
97-
by = chr(215) # ×
97+
by = chr(215) # × # noqa: RUF003
9898
self.write(
9999
f"<p>{len(self.frame)} rows {by} {len(self.frame.columns)} columns</p>"
100100
)

pandas/io/formats/style.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3489,7 +3489,7 @@ def highlight_quantile(
34893489
Left bound, in [0, q_right), for the target quantile range.
34903490
q_right : float, default 1
34913491
Right bound, in (q_left, 1], for the target quantile range.
3492-
interpolation : {linear’, ‘lower’, ‘higher’, ‘midpoint’, ‘nearest}
3492+
interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}
34933493
Argument passed to ``Series.quantile`` or ``DataFrame.quantile`` for
34943494
quantile estimation.
34953495
inclusive : {'both', 'neither', 'left', 'right'}

pandas/io/sql.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def read_sql_query(
441441
rows to include in each chunk.
442442
dtype : Type name or dict of columns
443443
Data type for data or columns. E.g. np.float64 or
444-
{‘a’: np.float64, ‘b’: np.int32, ‘c’: ‘Int64}.
444+
{'a': np.float64, 'b': np.int32, 'c': 'Int64'}.
445445
446446
.. versionadded:: 1.3.0
447447
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
@@ -597,7 +597,7 @@ def read_sql(
597597
.. versionadded:: 2.0
598598
dtype : Type name or dict of columns
599599
Data type for data or columns. E.g. np.float64 or
600-
{‘a’: np.float64, ‘b’: np.int32, ‘c’: ‘Int64}.
600+
{'a': np.float64, 'b': np.int32, 'c': 'Int64'}.
601601
The argument is ignored if a table is passed instead of a query.
602602
603603
.. versionadded:: 2.0.0
@@ -1759,7 +1759,7 @@ def read_query(
17591759
of rows to include in each chunk.
17601760
dtype : Type name or dict of columns
17611761
Data type for data or columns. E.g. np.float64 or
1762-
{‘a’: np.float64, ‘b’: np.int32, ‘c’: ‘Int64}
1762+
{'a': np.float64, 'b': np.int32, 'c': 'Int64'}
17631763
17641764
.. versionadded:: 1.3.0
17651765

0 commit comments

Comments
 (0)