I have below code and is working fine when I am executing from console. Now I want convert the code constructor which will help to call this and get data. Now I need to convert above code to constructor and call from another function. Which should return the pandas data frame. Expected out put is, when we call the constructor