Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

time-series

How to calculate rolling / moving average using python + NumPy / SciPy?

August 21, 2022 by Magenaut

There seems to be no function that simply calculates the moving average on numpy/scipy, leading to convoluted solutions.

Categories Python, Q&A Tags moving-average, numpy, python, rolling-computation, time-series Leave a comment

Pandas: rolling mean by time interval

August 20, 2022 by Magenaut

I’ve got a bunch of polling data; I want to compute a Pandas rolling mean to get an estimate for each day based on a three-day window. According to this question, the rolling_* functions compute the window based on a specified number of values, and not a specific datetime range.

Categories Python, Q&A Tags pandas, python, rolling-computation, time-series Leave a comment

Combine Date and Time columns using python pandas

August 20, 2022 by Magenaut

I have a pandas dataframe with the following columns:

Categories Python, Q&A Tags datetime, pandas, python, time-series Leave a comment

Pandas finding local max and min

August 16, 2022 by Magenaut

I have a pandas data frame with two columns one is temperature the other is time.

Categories Python, Q&A Tags dataframe, numpy, pandas, python, time-series Leave a comment

Can Pandas plot a histogram of dates?

August 14, 2022 by Magenaut

I’ve taken my Series and coerced it to a datetime column of dtype=datetime64[ns] (though only need day resolution…not sure how to change).

Categories Python, Q&A Tags matplotlib, pandas, python, time-series Leave a comment

Pandas: resample timeseries with groupby

August 14, 2022 by Magenaut

Given the below pandas DataFrame:

Categories Python, Q&A Tags group-by, pandas, python, time-series Leave a comment

Sliding window of M-by-N shape numpy.ndarray

August 13, 2022 by Magenaut

I have a Numpy array of shape (6,2):

Categories Python, Q&A Tags numpy, python, sliding-window, time-series Leave a comment

auto.arima() equivalent for python

August 12, 2022 by Magenaut

I am trying to predict weekly sales using ARMA ARIMA models. I could not find a function for tuning the order(p,d,q) in statsmodels. Currently R has a function forecast::auto.arima() which will tune the (p,d,q) parameters.

Categories Python, Q&A Tags forecasting, python, r, statsmodels, time-series Leave a comment

How to plot stacked event duration (Gantt Charts) using Python Pandas

August 12, 2022 by Magenaut

I have a Pandas DataFrame containing the date that a stream gage started measuring flow and the date that the station was decommissioned. I want to generate a plot showing these dates graphically. Here is a sample of my DataFrame:

Categories Python, Q&A Tags line-plot, matplotlib, pandas, python, time-series Leave a comment

python recursive vectorization with timeseries

August 12, 2022 by Magenaut

I have a Timeseries (s) which need to be processed recursively to get a timeseries result (res). Here is my sample code:

Categories Python, Q&A Tags numpy, python, recursion, time-series, vectorization Leave a comment
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress