Hi all,
Here's some code:
Mark
Here's some code:
print('Total number of changes in DTE value is {}'.format((df['DTE'] != df['DTE'].shift(1)).sum())) print('Total number of changes in DTE value and DTE < 151 is {}'.format((df['DTE'] != df['DTE'].shift(1)) \ and (df['DTE']<151).sum()))Line 1 correctly prints out the sum, but line 2 gives a ValueError about the series being ambiguous. My intent was just to add a second condition. If the syntax works for one, then why not for both?
Mark