BUG: Setting datetime value using dataframe masking appears to transpose the mask #46294
Open
2 of 3 tasks
Labels
Bug
Datetime
Datetime data dtype
Indexing
Related to indexing on series/frames, not to indexes themselves
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
The above code produces the following output:
The last outputted dataframe should have the NaT values along the second column, not the second row.
Expected Behavior
For the last dataframe above, I would expect it to look like this:
Installed Versions
INSTALLED VERSIONS
commit : 06d2301
python : 3.8.12.final.0
python-bits : 64
OS : Linux
OS-release : 5.11.0-1022-aws
Version : #23~20.04.1-Ubuntu SMP Mon Nov 15 14:03:19 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.1
numpy : 1.19.2
pytz : 2021.3
dateutil : 2.8.2
pip : 21.2.4
setuptools : 58.0.4
Cython : 0.29.25
pytest : 6.2.5
hypothesis : None
sphinx : 4.4.0
blosc : None
feather : None
xlsxwriter : 3.0.2
lxml.etree : 4.7.1
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.31.1
pandas_datareader: None
bs4 : 4.10.0
bottleneck : 1.3.2
fastparquet : None
fsspec : 2022.01.0
gcsfs : None
matplotlib : 3.5.1
numba : 0.54.1
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.6.2
sqlalchemy : 1.4.27
tables : 3.6.1
tabulate : None
xarray : None
xlrd : 2.0.1
xlwt : 1.3.0
zstandard : None
The text was updated successfully, but these errors were encountered: