Open
Description
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
texts=['abc']
languages=['en']
df = pd.DataFrame(columns=[
'text',
'language'
])
df.loc[:, 'text'] = texts
df.loc[:, 'language'] = languages
df
Issue Description
Rows are not inserted into DataFrame from lists of one element.
If I do
texts=['abc', 'def']
df = pd.DataFrame(columns=[
'text',
'language'
])
df.loc[:, 'text'] = texts
Then the rows are added.
This bug was introduced in v 2.0
Expected Behavior
As in v1.5.3:
text language
0 abc en
Installed Versions
pd.__version__ = '2.0.0'