pandas添加空列并赋空值案例 创建测试dataframe:>>> import pandas as pd >>> df = pd.DataFrame([{'a':1, 'b':2}, {'a':3, 'b':4}])>>> df a b 0 1 2 1 3 4 添加两个空列 >>> df[['c','d']]=df.apply(lambda x:('',''),axis=1,result_type='expand')>>> df a b...
fillna