这是我发起instabug的方式:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
rankings = pd.read_csv('data/rankingunitsdata.csv', parse_dates='date')
rankings.plot('date','rankingpos')
x = rankings.date.values
y = rankings.rankingpos.values
plt.plot(x,y, 'o')
plt.xlabel('Ranking Position')
plt.ylabel('Date')
plt.show()
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-15-b6d9eb0809d3> in <module>()
----> 1 plt.plot(x,y, 'o')
2 plt.xlabel('Ranking Position')
3 plt.ylabel('Date')
4 plt.show()
C:\Anaconda3\lib\site-packages\matplotlib\pyplot.py in plot(*args, **kwargs)
3097 ax.hold(hold)
3098 try:
-> 3099 ret = ax.plot(*args, **kwargs)
3100 draw_if_interactive()
3101 finally:
C:\Anaconda3\lib\site-packages\matplotlib\axes\_axes.py in plot(self, *args, **kwargs)
1372
1373 for line in self._get_lines(*args, **kwargs):
-> 1374 self.add_line(line)
1375 lines.append(line)
1376
C:\Anaconda3\lib\site-packages\matplotlib\axes\_base.py in add_line(self, line)
1502 line.set_clip_path(self.patch)
1503
-> 1504 self._update_line_limits(line)
1505 if not line.get_label():
1506 line.set_label('_line%d' % len(self.lines))
C:\Anaconda3\lib\site-packages\matplotlib\axes\_base.py in _update_line_limits(self, line)
1513 Figures out the data limit of the given line, updating self.dataLim.
1514 """
-> 1515 path = line.get_path()
1516 if path.vertices.size == 0:
1517 return
C:\Anaconda3\lib\site-packages\matplotlib\lines.py in get_path(self)
872 """
873 if self._invalidy or self._invalidx:
--> 874 self.recache()
875 return self._path
876
C:\Anaconda3\lib\site-packages\matplotlib\lines.py in recache(self, always)
573 x = ma.asarray(xconv, np.float_)
574 else:
--> 575 x = np.asarray(xconv, np.float_)
576 x = x.ravel()
577 else:
C:\Anaconda3\lib\site-packages\numpy\core\numeric.py in asarray(a, dtype, order)
472
473 """
--> 474 return array(a, dtype, copy=False, order=order)
475
476 def asanyarray(a, dtype=None, order=None):
ValueError: could not convert string to float: '17/08/2015'
正如您所看到的,我将其设置为显示介绍对话框但我的问题是,如果用户没有按屏幕,则不会被解雇。几秒钟之后可以关闭对话框吗?