machine-learning-for-trading icon indicating copy to clipboard operation
machine-learning-for-trading copied to clipboard

No object named P in the file

Open Impesud opened this issue 1 year ago • 3 comments

Describe the bug Hi, unfortunately I saw two errors in the code of chapter 2 and I can't find a solution.

In the file "01_parse_itch_order_flow_messages.ipynb" I see:

1."Cannot serialize the column [primary_market_maker] because its data contents are not [string] but [integer] object dtype L" , processes the binary file and produces the parsed orders stored by message type.

  1. "'No object named P in the file'", in the last section of the code.

Screenshots Screenshot 2023-12-10 143240

Environment VsCode v1.85 Python v1.8.10 JupytervVsCode extension v2023.11.1003402403

Impesud avatar Dec 10 '23 19:12 Impesud

Hi! I put the the solution here: https://github.com/Impesud/machine-learning-for-trading/blob/main/02_market_and_fundamental_data/01_NASDAQ_TotalView-ITCH_Order_Book/01_parse_itch_order_flow_messages.ipynb

View "Impesud Note" rows.

Impesud avatar Dec 20 '23 12:12 Impesud

Hi! I put the the solution here: https://github.com/Impesud/machine-learning-for-trading/blob/main/02_market_and_fundamental_data/01_NASDAQ_TotalView-ITCH_Order_Book/01_parse_itch_order_flow_messages.ipynb

View "Impesud Note" rows.

I had the same issue: "..Cannot serialize.." But your ("Impesud Note") version solved it.

Im on Linux, and use uptodate modules also, just had to rewrite the "Path".

Another difference: "store.append" vs "store._append", <- pandas.HDFStore last line, uhg, so the fix doesn't fix rollback versions of modules, that are suggested to use..

2f2a avatar Dec 22 '23 17:12 2f2a

Hi @2f2a In fact, store._append does not completely solve the problem. We should try again with the concat method, as I did, and find the right way to keep the Q column with the table format, eliminating the fixed one.

Impesud avatar Dec 28 '23 09:12 Impesud