Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Custom Pandas Error

    General Code/Help
    2
    3
    59
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wnwkr13 last edited by

      a12dd574-ee78-4605-a018-a8e2a0f2d9c9-image.png

      3b6ccfa9-e228-48ce-a87d-809f46b6c0b6-image.png

      ce907a54-ce78-4c39-ab3d-b405c7d758bc-image.png

      Hello, I got errors like
      e5561657-85d7-427b-aeaf-d139f5842da5-image.png

      How to solve this problem?

      vladisld 1 Reply Last reply Reply Quote 0
      • vladisld
        vladisld @wnwkr13 last edited by

        @wnwkr13 First few notes:

        1. Please do not post a code as image. Take a look at the very top of the page for the instructions on how to post code in the text format - this way one can copy/paste and try to repro the problem.
        2. It would be great if you could include your data (.csv) file sample - just to get the idea what format is used
        3. Please include the full backtrace of the error you've got - things will be much clearer this way.

        As for the problem, my wild guess is that pandas read_csv method wasn't able to deduce/parse the datetime column from the .csv file ( it could be in unknown format, unsupported resolution - in case of timestamps used - or missing).

        A similar problem was discussed few times here in the forum:

        https://community.backtrader.com/topic/3411/data-feed-format/6
        https://community.backtrader.com/topic/3384/attributeerror-int-object-has-no-attribute-to_pydatetime/18

        W 1 Reply Last reply Reply Quote 3
        • W
          wnwkr13 @vladisld last edited by

          @vladisld Thank you for your reply

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post
          Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors