Answer by Vladimir Fokow for fill na according to certain conditionals of...
You can first left-merge two dataframes (to align them), and then use np.select:result = df1.merge(df2, on=['State', 'Municipality'], how='left')condlist = [result['Date of...
View ArticleAnswer by Mike for fill na according to certain conditionals of other columns
import pandas as pddf1 = pd.DataFrame({'State': ['Aguascalientes', 'Jalisco', 'Jalisco', 'Jalisco'],'Municipality': ['Aguascalientes', 'Chapala', 'Chapala', 'Chapala'],'Date of Project': ['2003',...
View Articlefill na according to certain conditionals of other columns
I have the following table:StateMunicipalityDate of ProjectPoverty (year)AguascalientesAguascalientes2003JaliscoChapala2004JaliscoChapala2010JaliscoChapala2015In it I have to fill the column poverty...
View Article
More Pages to Explore .....