pandas ambigious hotfix

This commit is contained in:
louisnw
2023-11-02 11:41:03 +00:00
parent e587dd357c
commit c3645ef245
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -5,7 +5,7 @@ with open('README.md', 'r', encoding='utf-8') as f:
setup(
name='lightweight_charts',
version='1.0.18.3',
version='1.0.18.5',
packages=find_packages(),
python_requires='>=3.8',
install_requires=[