Some questions about time format and dataframe #492
Protomolekule
started this conversation in
General
Replies: 1 comment 1 reply
-
Either offset naive or aware is fine. If you wish to change the display timezone to something other than that of your computer's, you should set Try setting the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I will start with the simple questions:
** What is the perfect dataframe for finplot?**
I've seen examples using datetime index and datetime column. Please show me df.info() and some rows.
Does the df DateTime index need to be offset-naive or offset-aware?
How to handle TimeZone and localisation?
Do I have to remove localisation before plotting?
How to set DateTime format for the crosshair info?
The crosshair is build in init:
def _x2local_t(datasrc, x): if display_timezone == None: return _x2utc(datasrc, x) return _x2t(datasrc, x, lambda t: _millisecond_tz_wrap(datetime.fromtimestamp(t/1e9, tz=display_timezone).strftime(timestamp_format)))
The timestamp_format is set also in the init:
timestamp_format = '%Y-%m-%d %H:%M:%S.%f'
but in the crosshair only up to the hrs will be displayed (in a extra row without :00). I want to have it like '29.01.24\n10:24' No idea how this will build.
The solution mentioned in the finplot/examples/snp500.py is without manipulating the time format.
Thanks for your attention
Beta Was this translation helpful? Give feedback.
All reactions