How to use the finta.utils.resample function in finta

To help you get started, we’ve selected a few finta examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github peerchemist / finta / tests / test_utils_unit.py View on Github external
def test_resample_calendar():

    df = to_dataframe(data)
    assert isinstance(resample(df, "W-Mon"), DataFrame)
    assert list(resample(df, "W-Mon").index.values[-2:]) == [
        numpy.datetime64("2019-05-06T00:00:00.000000000"),
        numpy.datetime64("2019-05-13T00:00:00.000000000"),
    ]
github peerchemist / finta / tests / test_utils_unit.py View on Github external
def test_resample():

    df = to_dataframe(data)
    assert isinstance(resample(df, "2d"), DataFrame)
    assert list(resample(df, "2d").index.values[-2:]) == [
        numpy.datetime64("2019-05-05T00:00:00.000000000"),
        numpy.datetime64("2019-05-07T00:00:00.000000000"),
    ]
github peerchemist / finta / tests / test_utils_unit.py View on Github external
def test_resample():

    df = to_dataframe(data)
    assert isinstance(resample(df, "2d"), DataFrame)
    assert list(resample(df, "2d").index.values[-2:]) == [
        numpy.datetime64("2019-05-05T00:00:00.000000000"),
        numpy.datetime64("2019-05-07T00:00:00.000000000"),
    ]
github peerchemist / finta / tests / test_utils_unit.py View on Github external
def test_resample_calendar():

    df = to_dataframe(data)
    assert isinstance(resample(df, "W-Mon"), DataFrame)
    assert list(resample(df, "W-Mon").index.values[-2:]) == [
        numpy.datetime64("2019-05-06T00:00:00.000000000"),
        numpy.datetime64("2019-05-13T00:00:00.000000000"),
    ]