Introduction
Using Python, pandas, and wayscript, we can programmatically write excel files and automate the executions in just a few minutes.
Prerequisites
No prerequisites but some content you might find helpful:
Time Trigger
For this tutorial, we’ll use the Time Trigger module. It allows us to execute the WayScript at a time we’ll define. Add it as a new trigger.
Now, we can configure the Trigger.
Weather Data
WayScript provides a Weather module to integrate Open Weather Map's current weather and forecasts. Then, we’ll be able to make get weather data from any city without writing a line of code.
We’ll get data from New York. Make sure you have JSON_DATA selected.
Writing to Excel using Python
With WayScipt, we can also execute scripts written in Python. Here, we’ll use the pandas Python library to normalize our JSON_DATA and save it in an excel file. Add it as a new step.
We can now write and execute the Python script.
If you execute the script, you’ll notice a new file in the directory of your project. Here’s mine.
You can download it here.
Conclusion
Questions about this script or anything else? Join our Discord. We're always around to help. If you want to work with the full script template, just find it here.
Top comments (0)