Python Check If Dataframe Is Not Defined Error In Javascript The Xy