Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
i could not able to read excel file present in dataiku folders .could you please share me the code if possible thanks in advance
Hi,
From the Python API for managed folders we can get a handle to interact with the objects inside a folder. However, there is no specific Dataiku method for reading Excel files. One straightforward method to do so would be to use pandas. For example:
import dataiku
import pandas as pd
folder=dataiku.Folder('<name of folder>')
with folder.get_download_stream(<path of file inside folder>) as f:
data=f.read()
df=pd.read_excel(data,engine='openpyxl')
print(df)
Please note that depending on the details of your Python and DSS version and the extension of the files the code may need to be slightly different. Also, note I am using the 'openpyxl' engine to do the read. So the code env I am using has this package installed. You may choose to use a different one.
Hello @degananda264,
Did you try to use the "Create Dataset" when you selected your folder in your flow?