Statistical significance test using python I’m new to statistics and data science.
I’m working on a dataset where I found that the energy consumption during peak period of covid (mar 2020 to sep 2020) is 7% greater than the last year (mar 2019 to sep 2020) power consumption for a particular group of customers. My question is how should I test for significance? Means how to find out whether that 7% change is significant enough or not? Are there any pre built libraries in python to do this? If not how should I achieve this using python?
 A: 
My question is how should I test for significance?

This isn't an answer to your question because as it stands, your question is slightly ill posed.
Firstly, it sounds like you're trying to evaluate a hypothesis on the data that generated that hypothesis. That is a known statistical error and so I would encourage you not to concentrate on hypothesis tests but rather on estimation.
Which brings me to my second point.  Year over year comparisons are not very reliable in my opinion since they ignore overall time trends.  If energy consumption has been increasing over time, then the change you observe between these two periods could be completely normal and expected.  On the other hand, the overall time trend could obfuscate the true effect that covid has had on energy consumptiom, making covid appear to have a much larger effect than it really would.
A good approach might be to model monthly energy consumption, and have an additive effect of year and an additive effect of covid.  You could do this with linear regression quite easily and I think it would be better than simply passing the data to some sort of hypothesis test.  At the very least the assumptions could be assessed.
In short, you should get more data and focus more on estimation of effects rather than their significance. Significance is not synonymous with truth.
A: i'm pretty sure it depends on your opinion, not fact, although if you figure out the mean of the energy consumption for the last five to ten years, then you can figure out whether it is significant much more accurately.
