Python Forum
How can I count values between range dates ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I count values between range dates ?
#1
Hello everyone,

This is my first post in Forum Python, I am new at this so please bear with me.

I have this Code which I am trying to get results from. What I Need is to Count this specific value in this specific time of dates.

This is my Code :

df[(df['F_PRODDAT'] > '01.03.2018') & (df['F_PRODDAT'] <'01.03.2018')]['E_URSQSBEZ'].loc[df['E_URSQSBEZ'] == 'nicht befundet                                                                                      '].count()
As results I get zero but i am sure there are more then 300 values in this period of time.
I also tried to count all the values in this specific column during the range of date , this is the code :
df[(df['F_PRODDAT'] > '01.02.2018') & (df['F_PRODDAT'] <'01.04.2018')]['E_URSQSBEZ'].size()
and as a result I get really low number which is also not correct. when i use size() I get this error:

Error:
'int' object is not callable
Any help is much appriciated.
Reply
#2
try using just .size instead of .size()
Reply
#3
(Sep-03-2020, 11:53 AM)mlieqo Wrote: try using just .size instead of .size()

Thank you it helped.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Row Count and coloumn count Yegor123 4 1,337 Oct-18-2022, 03:52 AM
Last Post: Yegor123
  matplotlib x axis range goes over the set range Pedroski55 5 3,228 Nov-21-2021, 08:40 AM
Last Post: paul18fr
  Count number of values Kristenl2784 0 1,522 Jul-16-2020, 01:26 PM
Last Post: Kristenl2784
  Define a range, return all numbers of range that are NOT in csv data KiNeMs 18 7,095 Jan-24-2020, 06:19 AM
Last Post: KiNeMs
  update dict as per range of values anna 7 3,051 Sep-13-2019, 04:37 PM
Last Post: anna
  count unique values of a list with a list 3Pinter 2 4,868 Jul-05-2018, 11:52 AM
Last Post: 3Pinter
  count of days between two dates ikeen 4 7,497 Apr-10-2018, 08:18 AM
Last Post: ikeen

Forum Jump:

User Panel Messages

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