def relevant_items(df):
    """
    Dataframe with items used by cultural projects,
    filtered by date and price.
    """
    start_date = datetime(2013, 1, 1)

    df['DataProjeto'] = pd.to_datetime(df['DataProjeto'])

    # get only projects newer than start_date
    # and items with price > 0
    df = df[df.DataProjeto >= start_date]
    df = df[df.VlUnitarioAprovado > 0.0]

    return df
def relevant_items ( df ) : start_date = datetime ( 2013 , 1 , 1 ) df [ 'DataProjeto' ] = pd . to_datetime ( df [ 'DataProjeto' ] ) df = df [ df . DataProjeto >= start_date ] df = df [ df . VlUnitarioAprovado > 0.0 ] return df
Dataframe with items used by cultural projects,
    filtered by date and price.