On 05/21/2018 11:17 AM, Asif Iqbal wrote:

> I want to overwrite the row
> 
>   print ( df.loc['2018-01-24'] )
>   2018-01-24 0.0 1.0 2.0 3.0 4.0 NaN
> 
> 
>   df.loc['2018-01-24'] = [0,1,2,3,4,5]
>   ValueError: cannot set using a list-like indexer with a different length
> than the value

given what you have reported above, your current entry contains the
date, so a list of seven entries; you're trying to replace it with a
list of six entries, so the error seems as expected.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to