Although @FiloCara 's answer is reliable, it did not work for me until I put the warning-generating code in a context:
with warnings.catch_warnings():
warnings.simplefilter("ignore", category=pd.errors.PerformanceWarning)
# code that generates warnings ...