Skip to content

Commit e755462

Browse files
committed
Move whatsnew note and use OrderedDict in test
1 parent db65af9 commit e755462

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/source/whatsnew/v0.23.0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ Other Enhancements
295295
- ``IntervalIndex.astype`` now supports conversions between subtypes when passed an ``IntervalDtype`` (:issue:`19197`)
296296
- :class:`IntervalIndex` and its associated constructor methods (``from_arrays``, ``from_breaks``, ``from_tuples``) have gained a ``dtype`` parameter (:issue:`19262`)
297297
- Added :func:`SeriesGroupBy.is_monotonic_increasing` and :func:`SeriesGroupBy.is_monotonic_decreasing` (:issue:`17015`)
298+
- :func:`DataFrame.from_dict` now accepts a ``columns`` argument that can be used to specify the column names when ``orient='index'`` is used (:issue:`18529`)
298299

299300
.. _whatsnew_0230.api_breaking:
300301

@@ -589,7 +590,6 @@ Other API Changes
589590
- :func:`Series.to_csv` now accepts a ``compression`` argument that works in the same way as the ``compression`` argument in :func:`DataFrame.to_csv` (:issue:`18958`)
590591
- Set operations (union, difference...) on :class:`IntervalIndex` with incompatible index types will now raise a ``TypeError`` rather than a ``ValueError`` (:issue:`19329`)
591592
- :class:`DateOffset` objects render more simply, e.g. ``<DateOffset: days=1>`` instead of ``<DateOffset: kwds={'days': 1}>`` (:issue:`19403`)
592-
- :func:`DataFrame.from_dict` now accepts a ``columns`` argument that can be used to specify the column names when ``orient='index'`` is used (:issue:`18529`)
593593

594594
.. _whatsnew_0230.deprecations:
595595

pandas/tests/frame/test_constructors.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,8 @@ def test_from_dict_columns_parameter(self):
10951095
# GH 18529
10961096
# Test new columns parameter for from_dict that was added to make
10971097
# from_items(..., orient='index', columns=[...]) easier to replicate
1098-
result = DataFrame.from_dict(dict([('A', [1, 2]), ('B', [4, 5])]),
1098+
result = DataFrame.from_dict(OrderedDict([('A', [1, 2]),
1099+
('B', [4, 5])]),
10991100
orient='index', columns=['one', 'two'])
11001101
expected = DataFrame([[1, 2], [4, 5]], index=['A', 'B'],
11011102
columns=['one', 'two'])

0 commit comments

Comments
 (0)