DOC: clarify idxmax behaviour issue #18206 (#18209) · pandas-dev/pandas@63e8527 (original) (raw)
2 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -5805,7 +5805,12 @@ def idxmin(self, axis=0, skipna=True): | ||
5805 | 5805 | 0 or 'index' for row-wise, 1 or 'columns' for column-wise |
5806 | 5806 | skipna : boolean, default True |
5807 | 5807 | Exclude NA/null values. If an entire row/column is NA, the result |
5808 | - will be NA | |
5808 | + will be NA. | |
5809 | + | |
5810 | + Raises | |
5811 | + ------ | |
5812 | + ValueError | |
5813 | + * If the row/column is empty | |
5809 | 5814 | |
5810 | 5815 | Returns |
5811 | 5816 | ------- |
@@ -5836,7 +5841,12 @@ def idxmax(self, axis=0, skipna=True): | ||
5836 | 5841 | 0 or 'index' for row-wise, 1 or 'columns' for column-wise |
5837 | 5842 | skipna : boolean, default True |
5838 | 5843 | Exclude NA/null values. If an entire row/column is NA, the result |
5839 | - will be first index. | |
5844 | + will be NA. | |
5845 | + | |
5846 | + Raises | |
5847 | + ------ | |
5848 | + ValueError | |
5849 | + * If the row/column is empty | |
5840 | 5850 | |
5841 | 5851 | Returns |
5842 | 5852 | ------- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1306,7 +1306,13 @@ def idxmin(self, axis=None, skipna=True, *args, **kwargs): | ||
1306 | 1306 | Parameters |
1307 | 1307 | ---------- |
1308 | 1308 | skipna : boolean, default True |
1309 | - Exclude NA/null values | |
1309 | + Exclude NA/null values. If the entire Series is NA, the result | |
1310 | + will be NA. | |
1311 | + | |
1312 | + Raises | |
1313 | + ------ | |
1314 | + ValueError | |
1315 | + * If the Series is empty | |
1310 | 1316 | |
1311 | 1317 | Returns |
1312 | 1318 | ------- |
@@ -1336,7 +1342,13 @@ def idxmax(self, axis=None, skipna=True, *args, **kwargs): | ||
1336 | 1342 | Parameters |
1337 | 1343 | ---------- |
1338 | 1344 | skipna : boolean, default True |
1339 | - Exclude NA/null values | |
1345 | + Exclude NA/null values. If the entire Series is NA, the result | |
1346 | + will be NA. | |
1347 | + | |
1348 | + Raises | |
1349 | + ------ | |
1350 | + ValueError | |
1351 | + * If the Series is empty | |
1340 | 1352 | |
1341 | 1353 | Returns |
1342 | 1354 | ------- |