ValueError: All arrays must be of the same length

目录

a = pd.DataFrame({
    
    'a':[1,2,3], 'b':[4,5]})

ValueError: All arrays must be of the same length.

a = pd.DataFrame.from_dict({
    
    'a':[1,2,3], 'b':[4,5]}, orient='index')
a
Out[4]: 
   0  1    2
a  1  2  3.0
b  4  5  NaN

猜你喜欢

转载自blog.csdn.net/weixin_46713695/article/details/129730060