I'm aware there are a few threads about this but I'm having trouble with the actual SettingWithCopyWarning
itself so none of them are of any help.
I've recently nuked my machine and am in the process of reinstalling Pycharm and all the libraries etc. On running some of my scripts I keep getting an error to do with suppressing the SettingWithCopyWarning
.
import warnings
from pandas.core.common import SettingWithCopyWarning
warnings.simplefilter(action="ignore", category=SettingWithCopyWarning)
These are the lines I'm running, and they result in the following error message:
ImportError: cannot import name 'SettingWithCopyWarning' from 'pandas.core.common'
I've looked at the common.py
file and see no reference to the SettingWithCopyWarning
. I'm using Python 3.8, and Pandas version 1.5.3.
Cheers