Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (120 points)

I have the following dataframe

index       ltp

0       12.0

20        24.0

1        25.0

for the below code

df.loc[0:0,'ltp'].sub(df.loc[20:20,'ltp']) ideally i should get -24 as the result. how ever i get the following result

0    NaN

20   NaN

not sure where my error is. can someone guide

Please log in or register to answer this question.

Browse Categories

...