Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
  Question Thread: Dataframe: comparing value in last row vs the row before last
Post: Dataframe: comparing value in last row vs the row ...

Is the following a valid code? I am simply trying to compare the contents of the previous row vs the 2nd previous row. if row['DIRECTION'].shift(1) == row['DIRECTION'].shift(2)I am getting this error...
lorensa74 General Coding Help 2 2,669 Jul-07-2021, 01:47 PM
    Thread: [Solved] How to refer to dataframe column name based on a list
Post: RE: How to refer to dataframe column name based on...

Solved it. Should be like so: df_ma['DIFF'] = df_ma[f"MA_{ma_list[0]}"] - df_ma[f"MA_{ma_list[1]}"]
lorensa74 Data Science 1 2,269 May-17-2021, 07:02 AM
  Question Thread: [Solved] How to refer to dataframe column name based on a list
Post: [Solved] How to refer to dataframe column name bas...

I am new to python, so my question may not have the correct terminology. I hope my intent is clear enough. ma_list = [5,10] ---- A. Based on ma_list, I created two new columns (MA_5 & MA_10) i...
lorensa74 Data Science 1 2,269 May-17-2021, 04:41 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020