Python Forum
Information how pandas works
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Information how pandas works
#9
The main idea was to determine (roughly) the number of rows to be read from the end of the file.
Since we know interval of measurements = 15 min, and the number of days = 28, we can expect that
last 1440*28/15 rows of the file include measurements for last 28 days. So, we don't need to load entire
file. It is sufficient to load last 1440*28/15 rows from it. This is preliminary filtering. From
these rows we can build a data frame. Further, we need to do precise filtering, using pandas, as you do in your code.

You told about 28 days, but in the following line of code, you take data for 14 days. Is it an error?
df = df.loc[df['rdate'] > datetime.datetime.now() - pd.to_timedelta("14day")]
Reply


Messages In This Thread
Information how pandas works - by gehrenfeld - Feb-04-2019, 09:59 PM
RE: Information how pandas works - by stullis - Feb-05-2019, 02:38 AM
RE: Information how pandas works - by scidam - Feb-05-2019, 11:30 AM
RE: Information how pandas works - by gehrenfeld - Feb-05-2019, 12:29 PM
RE: Information how pandas works - by scidam - Feb-06-2019, 12:22 AM
RE: Information how pandas works - by gehrenfeld - Feb-06-2019, 01:00 PM
RE: Information how pandas works - by scidam - Feb-07-2019, 12:41 AM
RE: Information how pandas works - by gehrenfeld - Feb-07-2019, 12:51 PM
RE: Information how pandas works - by scidam - Feb-07-2019, 11:44 PM
RE: Information how pandas works - by gehrenfeld - Feb-08-2019, 01:09 PM
RE: Information how pandas works - by scidam - Feb-09-2019, 11:25 AM
RE: Information how pandas works - by gehrenfeld - Feb-09-2019, 12:17 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How do I convert my data so it works with Pandas? Oliver 0 2,430 Dec-11-2017, 04:09 PM
Last Post: Oliver

Forum Jump:

User Panel Messages

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