Just getting this new warning for my dataframes that are loaded from excel.
I understand if I were to pd.DataFrame I could set the index, but I am not clear how to set the dataframe index type when I am loading from a file.
C:\python\python38\lib\site-packages\geopandas\io\file.py:362: FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead.
Excerpt from class:
xls = pd.ExcelFile('C:/QGISwork/generic_templates/fielddbtemplate_db.xlsx')
self.header = xls.parse('generic', header = None)
self.df = xls.parse('generic', skiprows=4, index_col=0, na_values=['NA'])
I had faced same issue while training XGBoostClassifier on my local machine.
As per this link, I upgraded my XGBoost from 1.5.1 to 1.6.1 and all such warnings disappeared.
To upgrade version you may first need to uninstall current XGBoost package using
pip3 uninstall xgboost
Next, reinstall XGBoost using
pip3 install xgboost
The warning is generating merely just by importing xgboost too. No apparent way to stop the warnings unless you explicitly suppress them using the "warnings" library.
Interestingly, the warning only generates when using the specific Int64Index method, but not an equivalent object. I don't think you will have to worry about problems unless you were using this method.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With