using time in excel if function code example
Example 1: filter data in a dataframe python on a if condition of a value
python by Testy Toucan
on May 22 2020 Donate
# filter rows in a dataframe by a condition on a column
df_filtered = df.loc[df['column'] == value]
Example 2: Try out the enumerate function for yourself in this quick exercise. Complete the skip_elements function to return every other element from the list, this time using the enumerate function to check if an element is on an even position or an odd position.
def altElement(a):
return a[::2]