Index de l'article

Warnings

Avoid indexation problems after dataframes concat

Sometimes after a dataframes concatenation, the indexes are melted and can cause some problems. Just ignore the index in your new dataframe:

df_Selections = pd.concat([firstSelection, secondSelection], axis=0, ignore_index=True)

 Avoid copy warning (example 1)

import warnings
from pandas.core.common import SettingWithCopyWarning
 
warnings.simplefilter(action='ignore', category=SettingWithCopyWarning)

 Avoid copy warning (example 2)

# Below importations, above your code
pd.options.mode.chained_assignment = None

Avoid user warning 

import warnings
 
warnings.simplefilter(action='ignore', category=UserWarning)

Avoid future warning 

import warnings
 
warnings.simplefilter(action='ignore', category=FutureWarning)