Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Add sort_index() to closing data #161

Open
@dan3dewey

Description

@dan3dewey

The dataframes do not seem to be in date-sorted order, this is not a problem for the plotting of the time series, but the autocorrelation, etc. assumes they are sorted.

A work-around is to add a sort_index() to the first "Munge the data" code cell, e.g., to read:

closing_data = pd.DataFrame()
   . . .
closing_data['aord_close'] = aord['Close']

# Put the closing_data in sorted order *** Needed for autocorrelation to work ***
closing_data = closing_data.sort_index()

# Pandas includes a very convenient function for filling gaps in the data.
closing_data = closing_data.fillna(method='ffill')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions