Skip to content

TST: Add test for operations on DataFrame with Interval CategoricalIndex #27443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
Jul 23, 2019
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
e41387d
BUG: None comparison evaluates to True #26504
another-green May 24, 2019
9af03ce
ENH - Index set operation modifications to address issue #23525 (#23538)
ms7463 May 21, 2019
620fa59
DOC/CLN: wil -> will (#26484)
simonjayhawkins May 21, 2019
aad1bf9
Fixed typo mutiplication -> multiplication. (#26489)
javabrett May 22, 2019
ef87d02
DOC: fix SyntaxError in doc build on Windows (#26499)
simonjayhawkins May 23, 2019
89cc7f2
DOC: Highlighted role of index alignment in DataFrame.dot(other) (#26…
matsmaiwald May 23, 2019
babd572
DOC/CLN: Change API reference section title (#26486)
simonjayhawkins May 24, 2019
4c231a7
CLN: Remove StringMixin from PandasObject (#26505)
topper-123 May 24, 2019
cffbaac
Fix type annotations in pandas.core.indexes.datetimes (#26404)
vaibhavhrt May 24, 2019
a8af7a1
Better error message for DataFrame.hist() without numerical columns (…
matsmaiwald May 24, 2019
ac02674
Excel Test Cleanup - ReadWriteClass (#26473)
WillAyd May 24, 2019
9151211
CLN: pd.TimeGrouper (#26477)
mroeschke May 24, 2019
8c8a175
CLN: Remove ExcelWriter.sheetname (#26464)
mroeschke May 25, 2019
9d6d959
CLN: Remove deprecated parse_cols from read_excel (#26522)
mroeschke May 25, 2019
3bb4766
[TEST] Add two more parameters to the test_dti_add_sub_nonzero_mth_of…
makbigc May 25, 2019
014abdc
Remove py.path special handling from io.common (#26458)
nandahkrishna May 26, 2019
420eee5
CLN: remove StringMixin from code base, except core.computation (#26523)
topper-123 May 26, 2019
48a4b8c
MAINT: port numpy#13188 for np_datetime simplification (#26516)
xcz011 May 26, 2019
3e20569
fix categorical comparison with missing values #26504
another-green May 29, 2019
4d92eed
Merge branch 'master' into master
another-green May 29, 2019
7e6662d
Update test_operators.py
another-green May 29, 2019
16dac3a
Update categorical.py
another-green May 29, 2019
9464f72
Update test_operators.py
another-green May 29, 2019
c2b7343
Update test_operators.py
another-green May 29, 2019
65014e7
Update doc/source/whatsnew/v0.25.0.rst
another-green May 29, 2019
8964f0a
Update test_operators.py
another-green May 30, 2019
7f404d2
Update test_operators.py
another-green May 30, 2019
19e3711
Update v0.25.0.rst
another-green May 30, 2019
2fc1d27
Update test_operators.py
another-green May 30, 2019
c80c2dc
Update test_operators.py
another-green May 30, 2019
2e01686
Update test_operators.py
another-green May 30, 2019
924f693
Update test_operators.py
another-green May 30, 2019
3b4a42a
Update categorical.py
another-green May 30, 2019
57480bd
Update test_operators.py
another-green May 30, 2019
99204a4
Merge remote-tracking branch 'upstream/master' into cat
another-green May 31, 2019
045c912
Merge remote-tracking branch 'upstream/master' into cat
another-green May 31, 2019
8bb9bcf
fix categorical comparison with missing values
another-green May 31, 2019
d83c4f4
Merge remote-tracking branch 'upstream/master' into cat
another-green Jun 1, 2019
f79e49a
Merge remote-tracking branch 'upstream/master'
another-green Jul 17, 2019
0bf8527
DOC: cleanup docstring for read_json and fix error in contribution gu…
mpmoran Jul 17, 2019
7e27254
BUG: Fix insertion of wrong-dtypes NaT into Series[m8ns] (#27323)
jbrockmendel Jul 17, 2019
a101f9e
TYPING: pandas/core/window.py (#27391)
mroeschke Jul 18, 2019
7a5dac4
TST: Add test for operations on DataFrame with Interval CategoricalIndex
another-green Jul 20, 2019
1f0dbf9
Merge remote-tracking branch 'upstream/master' into test_CategoricalI…
another-green Jul 20, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions pandas/tests/frame/test_arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,3 +642,14 @@ def test_arith_non_pandas_object(self):
val3 = np.random.rand(*df.shape)
added = pd.DataFrame(df.values + val3, index=df.index, columns=df.columns)
tm.assert_frame_equal(df.add(val3), added)

def test_operations_with_interval_categories_index(self, all_arithmetic_operators):
# GH#27415
op = all_arithmetic_operators
ind = pd.CategoricalIndex(pd.interval_range(start=0.0, end=2.0))
data = [1, 2]
df = pd.DataFrame([data], columns=ind)
num = 10
result = getattr(df, op)(num)
expected = pd.DataFrame([[getattr(n, op)(num) for n in data]], columns=ind)
tm.assert_frame_equal(result, expected)