Skip to content

Conversation

@gcbeltramini
Copy link
Contributor

@jreback
Copy link
Contributor

jreback commented Dec 26, 2016

tests please

@jreback jreback added Bug Indexing Related to indexing on series/frames, not to indexes themselves Reshaping Concat, Merge/Join, Stack/Unstack, Explode Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels Dec 26, 2016
dtype=float)
expected_def = DataFrame(data=[[np.nan, 11, 12, np.nan, 13, np.nan],
[np.nan, 21, 22, np.nan, 23, np.nan],
[np.nan, 31, 32, np.nan, 33, np.nan]],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just do these as:

result = ....
expected = ...
assert_frame_equal(result, expected)

easier to read this way

newFrame = self.frame.reindex(columns=[])
self.assertTrue(newFrame.empty)

# GH 14992, reindexing over columns ignored method
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can make it a new test

[21, 21, 22, 23, 23, np.nan],
[31, 31, 32, 33, 33, np.nan]],
index=[1, 2, 4],
columns=range(6),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add similar tests for sparse as well.

- Bug in ``DataFrame(..).apply(to_numeric)`` when values are of type decimal.Decimal. (:issue:`14827`)
- Bug in ``describe()`` when passing a numpy array which does not contain the median to the ``percentiles`` keyword argument (:issue:`14908`)
- Bug in ``DataFrame.sort_values()`` when sorting by multiple columns where one column is of type ``int64`` and contains ``NaT`` (:issue:`14922`)
- Bug in ``DataFrame.reindex()`` when using ``columns`` and ``method`` (:issue:`14992`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

say that when passingcolumns, method was ignored.

@codecov-io
Copy link

codecov-io commented Dec 26, 2016

Current coverage is 84.78% (diff: 100%)

Merging #14993 into master will increase coverage by 0.12%

@@             master     #14993   diff @@
==========================================
  Files           144        145     +1   
  Lines         51056      51091    +35   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43225      43316    +91   
+ Misses         7831       7775    -56   
  Partials          0          0          

Powered by Codecov. Last update 72786cc...9c9ad95

@jreback jreback added this to the 0.20.0 milestone Dec 30, 2016
@jreback jreback closed this in 859c80f Dec 30, 2016
@jreback
Copy link
Contributor

jreback commented Dec 30, 2016

thanks!

@gcbeltramini gcbeltramini deleted the reindex branch September 21, 2017 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Indexing Related to indexing on series/frames, not to indexes themselves Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reindex function applied to DataFrame over columns ignores method

3 participants