Context: Our organization has developed a python script in Jupyter Notebooks that scrapes an electricity providers website and compares the power outages with some of our at risk residents' addresses. If there is a power outage then it uses an email function to alert staff of those power outages. We want to schedule this script as a stand-alone script on a local server with task scheduler to run every hour.
^^^ Since there are currently no power outages, I updated the script to email us all those residences that have power on. (Should be all of our at risk population). This works beautifully in Jupyter Notebooks.
Issue: When I export the notebook as a stand-alone python script and run it in PyCharm, it doesn't provide the same results. During the test for those with power on it shows zero and we do not get sent an email.
Example results in Jupyter Notebooks creating a list: (the list is called "off_records" but it's really grabbing "Power_Status" == "ON" for testing purposes)

This is the result of the same exact script using PyCharm:

Help! Any reason why these results would be different?
Thanks for your time,
Shari