get_dataframe using iloc

GeorgeAlex
Level 1
get_dataframe using iloc

instead of using

File_df = file.get_dataframe(columns =["TRANSPORTATION SERVICE PROVIDER","MAWB","HAWB","CARRIER/AIRLINE","SERVICE LEVEL","SHIPPER CITY (PICK UP LOCATION)",
# "SHIPPER STATE","SHIPPER COUNTRY","CONSIGNEE CITY","CONSIGNEE STATE","CONSIGNESS COUNTRY","PORT OF ARRIVAL",
# "ETD","ATD","ETA","ATA","BROKER TURNOVER","CUSTOMS CLEARED","DELIVERED"])

I want to use

File_df = file.get_dataframe( column location)

Reason - This recipe is reading files from different carriers which has different column names

0 Kudos
1 Reply
AlexT
Dataiker

Hi @GeorgeAlex ,
It's not support to specify a column location, but if the column location is managed folder, you could read the file read/write managed folder APIs and then create the list of columns from that file within your code

https://doc.dataiku.com/dss/latest/connecting/managed_folders.html#usage-in-python

Thanks,

0 Kudos