Skip to content

Choose strftime format argument in mnso.matrix (when using freq argument) #147

Description

@Sinnaeve

When I use the matrix function with a frequency inferior to a day the y axis labels are all the same because their format is fixed to '%Y-%m-%d'. It would be better to have the format as an option in function argument

ts_ticks = pd.date_range(df.index[0], df.index[-1],
                                     freq=freq).map(lambda t:
                                                    t.strftime('%Y-%m-%d'))

become

ts_ticks = pd.date_range(df.index[0], df.index[-1],
                                     freq=freq).map(lambda t:
                                                    t.strftime(format))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions