# Create new columns C, D, E by splitting the values in the "objectToBeSplit" column
df[['C', 'D', 'E']] = pd.DataFrame(df['objectToBeSplit'].tolist()).applymap(float)
# Dropping the original 'objectToBeSplit' column
df = df.drop('objectToBeSplit', axis=1)
# Print the updated DataFrame
print(df)
2条答案
按热度按时间uyto3xhc1#
有几种方法可以实现这一点
方法二:
pjngdqdw2#
假设一系列
set
:或者,如果您想重新分配到相同的名称:
输出:
可复制输入: