Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pandas Lib 'append' method outdated #23

Open
Rootthecause opened this issue Apr 4, 2024 · 1 comment
Open

pandas Lib 'append' method outdated #23

Rootthecause opened this issue Apr 4, 2024 · 1 comment

Comments

@Rootthecause
Copy link

Rootthecause commented Apr 4, 2024

With pandas 2.0 and newer:
AttributeError: 'DataFrame' object has no attribute 'append'. Did you mean: '_append'?

Resulting in a crash when connecting to the load via bt.

See stackoverflow for more details:
https://stackoverflow.com/questions/75956209/error-dataframe-object-has-no-attribute-append

As a quick fix (proved to be working) the following can be done but shouldn't according to stackoverflow:
in data_store.py line 21
self.data = self.data.append(row, ignore_index=True)
changed to
self.data = self.data._append(row, ignore_index=True)

Edit: Seems to crash again for similar reason but in main.py when doing internal resistance measurement.
However the same fix does not work here.

@Rootthecause Rootthecause changed the title pandas Lib outdated pandas Lib 'append' method outdated Apr 4, 2024
@brocasm
Copy link

brocasm commented Jul 16, 2024

I haven't found this code in data_store.py but in internatl_r.py line 26

def append(self, row):
        self.beginInsertRows(QModelIndex(), self.rowCount(1), self.rowCount(1))
        self._data = self._data.append(row, ignore_index=True)
        self.endInsertRows()

changed to

def append(self, row):
        self.beginInsertRows(QModelIndex(), self.rowCount(1), self.rowCount(1))
        self._data = self._data._append(row, ignore_index=True)
        self.endInsertRows()

works well for me,i will testing a little bit more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants