I am trying to plot from a csv file with column 1 as a datetime value, as below
27-08-2016 08:43 21.38329164
using this code:
from matplotlib import pyplot as plt
from matplotlib import style
import numpy as np
import datetime as dt
from datetime import datetime
import matplotlib.dates as mdates
style.use('ggplot')
x,y = np.genfromtxt('I112-1a.csv', unpack=True,dtype=None, delimiter = ',', converters={0: lambda x: datetime.strptime(x, '%d-%m-%Y %H:%M')})
plt.title('Panel Charge')
plt.ylabel('Y axis')
plt.xlabel('X axis')
plt.show()
I am getting this error:
x,y = np.genfromtxt('I112-1a.csv', unpack=True,dtype=None, delimiter = ',', converters={0: lambda x: datetime.strptime(x, '%d-%m-%Y %H:%M')})
ValueError: too many values to unpack
Please help! Thanks