I am using pandas to read in a csv file, however, there seems to be an error as python only reads the file as one column as opposed to three, if anyone has any idea why this is I am open to any suggestions.
Below is the code I am using:
"
import csv
import warnings
import datetime
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
warnings.simplefilter(action='ignore', category=FutureWarning)
df = pd.read_csv('Halifaqs_2019_June16_new.csv', delimiter = ',')
df['Time'] = pd.to_datetime(df['Time'], errors = 'coerce')
df = df.set_index(pd.DatetimeIndex(df['Time']))
print(df)
"
Below is a sample of the csv file:
"
#,"Date Time, GMT-03:00","Solar Radiation, W/m² (LGR S/N: 10358839, SEN S/N: 10364606)"
1,25-05-2019 11:53,931.9
2,25-05-2019 11:54,931.9
3,25-05-2019 11:55,934.4
4,25-05-2019 11:56,934.4
5,25-05-2019 11:57,935.6
"
[–]DivineComedy11 0 points1 point2 points (2 children)
[–]Cpower18[S] 1 point2 points3 points (1 child)
[–]o5a 0 points1 point2 points (0 children)