I am trying to get a list of phone numbers
here is the code
response='108'
group="MAMA"
optout='False'
phone_numbers = merged_df.loc[(merged_df['Facility Code'] ==facility_number) & (merged_df['group'] == group) & (merged_df['Optedout'] == optout)]['phone'].values
print(phone_numbers)
My dataframe looks like so
phone group County PNC/ANC Facility Name Optedout Facility Code
25470000000 MAMA Orange PNC Main Centre FALSE 112
25470000000 MAMA Orange PNC Main Centre FALSE 112
25470000010 MAMA Orange PNC Centre FALSE 108
25470000020 MAMA Orange PNC Centre FALSE 108
25470000000 MAMA Orange PNC Main Centre FALSE 112
This is the error I get
AttributeError: 'Series' object has no attribute 'value'
desired output
[25470000010,25470000020]
I can't seem to figure out what I am doing wrong. kindly help me fix this
.valuespart.values.valuesattribute. Could you have writtenvalueas the error suggests?