fileuploadid completedate ... Difference successful (SUM)
0 156691956 03/06/19 00:00 ... 0 1
1 156691958 03/06/19 00:00 ... 0 1
2 156730185 10/06/19 00:00 ... 0 1
3 156815823 25/06/19 00:00 ... 0 1
4 156752103 14/06/19 00:00 ... -4 1
Hi There, fairly new to python. I have imported the csv above, head() output shown. I am been trying to start a script that will read the column 'Difference' and tell me how many instances of rows are there with a numerical value between 0 and 1.
Can I do this in one simple query or do you need to create a list of all rows that contain a value of 0 and 1 and then do a count of that list?
From there I can build the script to compute what normally is done through excel like this:
=COUNTIFS(F:F, ">=0", F:F, "<=1")
What I have seen from courses and online hasn't worked so far.
One of the examples I have seen is this:
Any assistance anybody can provide will be greatly appreciated.
0 156691956 03/06/19 00:00 ... 0 1
1 156691958 03/06/19 00:00 ... 0 1
2 156730185 10/06/19 00:00 ... 0 1
3 156815823 25/06/19 00:00 ... 0 1
4 156752103 14/06/19 00:00 ... -4 1
Hi There, fairly new to python. I have imported the csv above, head() output shown. I am been trying to start a script that will read the column 'Difference' and tell me how many instances of rows are there with a numerical value between 0 and 1.
Can I do this in one simple query or do you need to create a list of all rows that contain a value of 0 and 1 and then do a count of that list?
From there I can build the script to compute what normally is done through excel like this:
=COUNTIFS(F:F, ">=0", F:F, "<=1")
What I have seen from courses and online hasn't worked so far.
One of the examples I have seen is this:
df = pd.DataFrame({'a': [1, 2, 3]}) df[(df.a > 1) & (df.a < 3)].count()But when applied to my datadrame it's not giving the output I am expecting.
Any assistance anybody can provide will be greatly appreciated.