orders["parent_order_id"].isnull() is no longer working.

Shaha
From Past 2 days i have received some fishy behaviour in the logs.. After troubleshooting i came across below:

From all these days i was able to filter the Main leg of the BO order using comparison of parent_order_id with .isnull() statement as given below.. But of late it has stopped working... Any changes done? if so, pls elaborate so that we are clear on impact on other areas of our script. Also, what is the proper way i shall be doing this now?

orders[orders["parent_order_id"].isnull()]


where....
orders=pandas.DataFrame(kite.orders())

Thanks.
Tagged:
  • Vivek
    @Shaha There was a minor hiccup with orders api and its been fixed now.
  • Shaha
    Thanks for fixing it so quickly. But i do not want to take any chances and want my code to be more robust in future in handling such scenario.

    So can you please elaborate what values were reflected i place of nulls... was it spaces or empty string or something else... I was not able to make out...

    I want to add such special case to my slicing list...


    Something like

    . Isnull() | .spaces | == "" | or something else... Pls suggest.
  • Vivek
    @shaha You can just do if variable. For example in this case if parent_order_id is sent then it will be more than few characters.
    if order["parent_order_id"]:
    pass
  • Shaha
    Thanks... Changed to

    np.where(orders.parent_order_id, ... )
This discussion has been closed.