Skip to content
Advertisement

Python algo trading pandas data clean up and call from another function

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.

JavaScript

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 from another function it should return the data.

BANKNIFTYDATA = zone.data() print(BANKNIFTYDATA)

JavaScript

0 2022-08-04 09:15:00 38111.05 38230.55 38111.05 38166.65 Bullish Basing 1 2022-08-04 09:20:00 38165.00 38165.00 38079.90 38098.80 Bearish Exciting 2 2022-08-04 09:25:00 38099.90 38157.50 38096.75 38113.05 Bullish Basing 3 2022-08-04 09:30:00 38114.45 38141.20 38086.10 38108.85 Bearish Basing 4 2022-08-04 09:35:00 38106.10 38115.00 38051.50 38066.40 Bearish Exciting 5 2022-08-04 09:40:00 38060.65 38111.75 38054.00 38081.95 Bullish Basing 6 2022-08-04 09:45:00 38081.80 38151.40 38080.75 38133.60 Bullish Exciting 7 2022-08-04 09:50:00 38133.85 38170.20 38131.05 38161.75 Bullish Exciting 8 2022-08-04 09:55:00 38163.20 38166.40 38112.10 38129.30 Bearish Exciting 9 2022-08-04 10:00:00 38131.70 38141.15 38093.10 38117.65 Bearish Basing

Advertisement

Answer

I got my answer..

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement