I have a function with a parameter (in this case: "department") to filter (df.loc[(df['A'] == department) specific data out of my dataset. In one case, I want to use this specific function but instead of filtering the data, I want to get all the data.
Is there a way to pass a parameter which would result in something like df.loc[(df['A'] == *) or df.loc[(df['A'] == %)
# Write the data to the table
def table_creation(table, department, status):
def condition_to_value(df, kpi):
performance_indicator = df.loc[(df['A'] == department) & (df['C'] == kpi) & (df['B'] == status), 'D'].values[0]
return performance_indicator