Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# for DateTimeIndexed DataFrames
for name, group in df.groupby([lambda x: x.date(), 'Some Feature']):
# within groupby object
# for dropping duplicate indices (sometimes a problem with DateTimeIndices)
group=group[~group.index.duplicated(keep = 'first')]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment