Time Series Processing with Pandas: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 8: Line 8:
=Load a Time Series=
=Load a Time Series=


Assuming the data comes from a CSV file whose first column, labeled "date", contains timestamp-formatted strings, and the second column contains values corresponding to those timestamps, this is how the data is loaded and turned into a [[Panda_Series#Overview|Panda Series]]:
Assuming the data comes from a CSV file whose first column, labeled "date", contains timestamp-formatted strings, and the second column contains values corresponding to those timestamps, this is how the data is loaded and turned into a [[Pandas_Series#Overview|Pandas Series]].
 
The content of the CSV file should be similar to:
<syntaxhighlight lang='csv'>
</syntaxhighlight>

Revision as of 19:01, 8 October 2023

Internal

Overview

This article provides hints on how time series can be processed with Pandas.

Load a Time Series

Assuming the data comes from a CSV file whose first column, labeled "date", contains timestamp-formatted strings, and the second column contains values corresponding to those timestamps, this is how the data is loaded and turned into a Pandas Series.

The content of the CSV file should be similar to: