Skip to content

Commit

Permalink
code sample for pandas-dev#46544
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjayhawkins committed Jul 8, 2022
1 parent ca1cd7b commit a4a2f7a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bisect/46544.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# BUG: DataFrame.loc is not consistent with DataFrame.__setitem__ when used with 2D numpy array #46544

import numpy as np
import pandas as pd

print(pd.__version__)

df = pd.DataFrame(np.zeros((256, 10)))
array_2d = np.zeros((256, 2))

df[0] = array_2d
df.loc[:, 0] = array_2d

0 comments on commit a4a2f7a

Please sign in to comment.