I need to write a function called read_data
that reads the iris dataset. The columns are in this order:
Column 1
Column 2
Column 3
Column 4
Column 5
The columns need to be returned in the following order:
Column 1
Column 3
Column 2
Column 4
Column 5
I tried
def read(file_path):
file_path = './file.csv'
with open (file_path, 'r') as fin:
for row in fin:
print(row)
How to change the order of the columns?