I have currency quotes in pandas dataframe, column 0 - date/time, column 1 - close price.
And as its a 1 minute period, there are a lot of gaps.
So I need to apply .asfreq(freq='T')
on close series, but also I must skip all weekends.
How do I do that? Unfourtunately, .asfreq(freq='BT')
doesnt work
Asked
Active
Viewed 135 times
0

Roman
- 47
- 7
-
1`df = df.asfreq(freq='T'); df = df[df[0].dt.dayofweek.lt(5)]`? – Quang Hoang Nov 14 '19 at 04:48
-
What ``.lt(5)`` means? – Roman Nov 14 '19 at 06:48
-
And also df[0] throws ``KeyError: 0`` – Roman Nov 14 '19 at 07:11
-
1Replace 0 with your first column name, lt means less than. – Quang Hoang Nov 14 '19 at 10:32