I have read my data from the s3 bucket into the lambda function using
tickets = s3_client.get_object(
Bucket=bucket, Key=file_h)["Body"].read().decode('utf-8').splitlines()
then I used
tickets=pd.DataFrame(list(reader(tickets, delimiter=',')))
to convert it to a pandas dataframe. I only want one header but when I print the dataframe it shows that it has two headers. How can I only keep the second header with the names? Same with the indices, how can I only keep one?
0 | 1 | ... | 13 | 14 | |
---|---|---|---|---|---|
0 | kennzeichen1 | ... | Lat | Long | |
1 | 0 | M | ... | 50.9347582 | 6.9456628 |
2 | 1 | SU | ... | 50.9350537 | 6.9439027 |
3 | 2 | BM | ... | 36.12707109999999 | -79.86071799999999 |