machine-learning-for-trading
machine-learning-for-trading copied to clipboard
No object named P in the file
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.
- "'No object named P in the file'", in the last section of the code.
Screenshots
Environment VsCode v1.85 Python v1.8.10 JupytervVsCode extension v2023.11.1003402403
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.
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..
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.