- Use datetime functions within the pandas
- pd.to_datetime
- pd.to_Timedelta`
- Use pd.date_range to generate date range
-
Avoid for loops that iterate over each row. Use aggregate functions wherever possible. [see this for an example]
-
If the requirements for plotting are simple and straightforward, consider using in-built plotting functions of pandas. This will not only save on importing additional packages but also code is more sleeker for visualisation with pandas.