Member-only story
Cool Python Tweaks To Add In Every Project
Welcome back! Python is an awesome programming language with a ton of capability, if you’re new to Python, check out the link below to learn more about it:
So, let’s take a look at some cool Python tweaks you can add in every project!
Hiding Warnings
There are many situations where you might get a warning, these usually are shown if a package you imported is outdated or you do things in your Python environment that are “legal” but may not be the best way to do it:
If you want to remove these types of warnings, all you have to do is put the following lines of code at the very top of your script:
import warnings
warnings.filterwarnings(action='ignore')
Getting Random Data
Next up, let’s take a look at getting random data from a dataset. Let’s use the list that we created…