UserWarning: Pandas doesn't allow columns to be created via a new attribute name

后端 未结 4 2092
南旧
南旧 2021-02-19 00:44

I am stuck with my pandas script.

Actually , i am working with two csv file(one input and the other output file). i want to copy all the rows of two column and want to m

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-19 01:16

    In df2.apply(lambda x: calculate_latoffset(x[b]), axis=1) you are creating a 5 column dataframe and you were trying to assign the value to a single field. Do df2[a] = calculate_latoffset(df2[b]) instead should deliver the desired output.

提交回复
热议问题