pandas ambigious hotfix
This commit is contained in:
2
.github/ISSUE_TEMPLATE/bug.yaml
vendored
2
.github/ISSUE_TEMPLATE/bug.yaml
vendored
@ -27,7 +27,7 @@ body:
|
||||
attributes:
|
||||
label: Reproducible Example
|
||||
description: >
|
||||
Please provide a minimal reproducible example, using generic (`ohlcv.csv`) data where applicable which demonstrates the current behaviour. The code should be complete and not require any further adjustments.
|
||||
Please provide a minimal reproducible example, using generic (`ohlcv.csv`) data where applicable which demonstrates the current behaviour. The code should be complete and not require any further adjustments. DO NOT provide: Incomplete code, unnecessarily long code, code which requires access to a broker/API, or code which uses additional functions/classes/libraries. In almost ALL cases the example should not exceed 50 lines.
|
||||
placeholder: >
|
||||
from lightweight_charts import Chart...
|
||||
render: python
|
||||
|
||||
@ -233,7 +233,7 @@ class SeriesCommon(Pane):
|
||||
series = self._series_datetime_format(series, exclude_lowercase=self.name)
|
||||
if self.name in series.index:
|
||||
series.rename({self.name: 'value'}, inplace=True)
|
||||
if self._last_bar and series['time'] != self._last_bar['time']:
|
||||
if self._last_bar is not None and series['time'] != self._last_bar['time']:
|
||||
self.data.loc[self.data.index[-1]] = self._last_bar
|
||||
self.data = pd.concat([self.data, series.to_frame().T], ignore_index=True)
|
||||
self._last_bar = series
|
||||
|
||||
Reference in New Issue
Block a user