Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- imp = mice.MICEData(dfLocal)
- fml = 'LOC1 ~ LOC2 + LOC3 + LOC4 + LOC5'
- mice = mice.MICE(fml, sm.OLS, imp)
- results = mice.fit(10, 10)
- print(results.summary())
- dfLocal.dropna(axis=0, how='all', inplace=True)
- imp.data = imp.data.set_index(dfLocal.index)
- # In this case I only want to fill one specific set of missing data
- # hence gap_start and gap_end
- dfLocal.loc[gapStart:gapEnd, 'LOC1'] = imp.data[fillSite]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement