Skip to content
Advertisement

Tag: time-series

decompose() for time series: ValueError: You must specify a period or x must be a pandas object with a DatetimeIndex with a freq not set to None

I have some problems executing an additive model right. I have the following data frame: And when I run this code: I got that message: ValueError: You must specify a period or x must be a pandas object with a >DatetimeIndex with a freq not set to None What should I do in order to get that example: The screen

Time Series Plot Seaborn with MultiIndex

I have the following dataset: The dataset spans three months and counts the occurrence of five codes per day. In order to plot the data I have just used the following code: I am wondering though, how this can be done using seaborn and a lineplot ? Answer Is this what you are looking for?

Is there a way to visualise time series data in such a way that on x-axis i get ticks in year-month format in python?

I am trying to plot a data of stock close price for each day but on the x-axis, i get no labels on xtick instead of year-month format I tried to take the “Date” and “Close Price” column in a separate dataframe and then tried plotting them. I have dataframe similar to this Answer Just covert it with pandas to_datetime()

Pandas finding local max and min

I have a pandas data frame with two columns one is temperature the other is time. I would like to make third and fourth columns called min and max. Each of these columns would be filled with nan’s except where there is a local min or max, then it would have the value of that extrema. Here is a sample

ObsPy Plot Beachball in Time Series

I am trying to plot an ObsPy (or any python) seismic focal mechanism in time series. When using an integer/float series for x it works fine, but the time series fails here: The function xy2patch in the source code is trying to scale the time by a float value. Any ideas? Hack the source? Other packages? Thanks. Answer Found it.

Advertisement