Retrieve file in python client.files.retrieve

Hi, I’ve been trying to retrieve a CSV file from an assistant. However, I don’t know how to extract the content from the retrieval output object.

My code looks like this:

csv_file_response = client.files.retrieve(
    with st.spinner("Cargando csv..."):
        while csv_file_response.status != 'processed':
            csv_file_response = client.files.content(

I followed the documentation so I don’t know why it’s not working.

Thank you in advance!