def plot_facet(self, data, color, **kwargs):
x = kwargs.get("x")
y = kwargs.get("y")
levels_x = kwargs.get("levels_x")
levels_y = kwargs.get("levels_y")
#num = []
#date = []
#time = data[self._time_column]
#num = data[self._time_column].apply(self.convert_to_datetime)
#date = data[self._time_column].apply(self.convert_to_timeseries)
#if pd.isnull(num).sum() <= pd.isnull(date).sum():
#data[self._time_column] = num
#else:
#data[self._time_column] = date
#data.dropna(inplace=True)
#if len(self._groupby) == 2:
#ct = pd.crosstab(data[self._time_column], data[self._groupby[0]])
#ct = ct.reindex_axis(self._levels[0], axis=1).fillna(0)
#ct = ct[pd.notnull(ct.index)]
#else:
#ct = pd.crosstab(
#data[self._time_column],
#pd.Series([""] * len(self._table[self._time_column]), name=""))
## Line plot:
#self.vmax = max(self.vmax, ct.values.max())
#ct.plot(ax=plt.gca(), color=self.get_palette())
评论列表
文章目录