[Python] Transpose IBRK Bar Date from Column to Row, with commas in Python

Discussão em 'Python' iniciado por Stack, Setembro 11, 2024.

  1. Stack

    Stack Membro Participativo

    Here is the columns result:

    1725991200.0 106.55
    1725991500.0 106.88
    1725991800.0 107.06
    1725992100.0 107.25
    1725992400.0 107.02
    1725992700.0 107.08
    1725993000.0 107.26
    1725993300.0 107.14
    1725993600.0 107.32
    1725993900.0 107.24
    1725994200.0 107.05
    1725994500.0 107.06
    1725994800.0 107.06
    1725995100.0 107.1
    1725995400.0 107.14
    1725995700.0 107.03
    1725996000.0 107.06
    1725996300.0 107.25
    1725996600.0 107.46
    1725996900.0 107.33
    1725997200.0 107.4
    1725997500.0 107.45
    1725997800.0 107.33
    1725998100.0 107.68


    Want to transpose to:

    X=array(1725991200.0, 1725991500.0, 1725991800.0, 1725992100.0, 1725992400.0 .......
    Y=array(106.55, 106.88, 107.06, 107.25, 107.02, 107.08, 107.26 .........


    To create an array that I can use for statistical use like SciPy Stats (trying to create a regression line find slope).The left columns is ordinal datetime.

    Continue reading...

Compartilhe esta Página