Skip to content

Commit f69cfe6

Browse files
committed
update docs and ignore E501 in added tests
1 parent 7bc3b08 commit f69cfe6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,13 +1032,13 @@ Bug fixes
10321032
Categorical
10331033
^^^^^^^^^^^
10341034
- Bug in :class:`Categorical` where constructing from a pandas :class:`Series` or :class:`Index` with ``dtype='object'`` did not preserve the categories' dtype as ``object``; now the ``categories.dtype`` is preserved as ``object`` for these cases, while numpy arrays and Python sequences with ``dtype='object'`` continue to infer the most specific dtype (for example, ``str`` if all elements are strings) (:issue:`61778`)
1035+
- Bug in :class:`pandas.Categorical` displaying string categories without quotes when constructed from a Series with dtype "string" (:issue:`63045`)
10351036
- Bug in :func:`Series.apply` where ``nan`` was ignored for :class:`CategoricalDtype` (:issue:`59938`)
10361037
- Bug in :func:`bdate_range` raising ``ValueError`` with frequency ``freq="cbh"`` (:issue:`62849`)
10371038
- Bug in :func:`testing.assert_index_equal` raising ``TypeError`` instead of ``AssertionError`` for incomparable ``CategoricalIndex`` when ``check_categorical=True`` and ``exact=False`` (:issue:`61935`)
10381039
- Bug in :meth:`Categorical.astype` where ``copy=False`` would still trigger a copy of the codes (:issue:`62000`)
10391040
- Bug in :meth:`DataFrame.pivot` and :meth:`DataFrame.set_index` raising an ``ArrowNotImplementedError`` for columns with pyarrow dictionary dtype (:issue:`53051`)
10401041
- Bug in :meth:`Series.convert_dtypes` with ``dtype_backend="pyarrow"`` where empty :class:`CategoricalDtype` :class:`Series` raised an error or got converted to ``null[pyarrow]`` (:issue:`59934`)
1041-
-
10421042

10431043
Datetimelike
10441044
^^^^^^^^^^^^

pandas/tests/arrays/categorical/test_repr.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,10 +545,11 @@ def test_categorical_str_repr(self):
545545
result = repr(Categorical([1, "2", 3, 4]))
546546
expected = "[1, '2', 3, 4]\nCategories (4, object): [1, 3, 4, '2']"
547547
assert result == expected
548-
548+
549549
def test_categorical_with_pandas_series(self):
550550
# GH 63045
551551
s = Series(["apple", "banana", "cherry", "cherry"], dtype="string")
552-
result =repr(Categorical(s))
553-
expected = "['apple', 'banana', 'cherry', 'cherry']\nCategories (3, string): ['apple', 'banana', 'cherry']"
552+
result = repr(Categorical(s))
553+
expected = "['apple', 'banana', 'cherry', 'cherry']\nCategories (3, string): ['apple', 'banana', 'cherry']" # noqa: E501
554+
554555
assert result == expected

0 commit comments

Comments
 (0)