You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUG/TST: Empty input arrays in cartesian_product and MultiIndex (pandas-dev#12258)
closespandas-dev#12258
1. fixes logic (and division by 0) in `cartesian_product` when some input arrays are empty
2. adds tests for MultiIndex empty level construction with `.from_arrays` and `.from_product`
Author: Piotr Jucha <[email protected]>
Closespandas-dev#14151 from pijucha/cartesian and squashes the following commits:
b831516 [Piotr Jucha] BUG/TST: Empty input arrays in cartesian_product and MultiIndex (pandas-dev#12258)
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.19.0.txt
+1
Original file line number
Diff line number
Diff line change
@@ -1471,6 +1471,7 @@ Bug Fixes
1471
1471
- Bug in ``MultiIndex`` slicing where extra elements were returned when level is non-unique (:issue:`12896`)
1472
1472
- Bug in ``.str.replace`` does not raise ``TypeError`` for invalid replacement (:issue:`13438`)
1473
1473
- Bug in ``MultiIndex.from_arrays`` which didn't check for input array lengths matching (:issue:`13599`)
1474
+
- Bug in ``cartesian_product`` and ``MultiIndex.from_product`` which may raise with empty input arrays (:issue:`12258`)
1474
1475
1475
1476
1476
1477
- Bug in ``pd.read_csv()`` which may cause a segfault or corruption when iterating in large chunks over a stream/file under rare circumstances (:issue:`13703`)
0 commit comments