You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then filter column 'a' by those having value 'no'. Than delete the entries of column 'b'. A pandas warning on setting a value on a copy will appear, and as suggested when printing
df
Column 'b' will still show contents.
The text was updated successfully, but these errors were encountered:
@DiegoF90 so inplace=True might be a little misleading. On initial load of a dataframe to D-Tale a call to reset_index occurs (this is to ensure the dataframe is in a normalized format with a standard "natural" index of 0...n). When you call dtale.show with inplace=True it will make that call to reset_index an inplace operation to lower memory usage. Unfortunately, this is where that flag's usage ends.
What you want to do in order to get your updated dataframe would be:
import pandas as pd
import dtale
df = pd.DataFrame({'a': ['yes', 'no', 'no', 'maybe'], 'b': ['foo', 'bar', 'spam', 'eggs']})
d = dtale.show(
df,
inplace=True
)
# perform edits using the app
d.data # this retrieves the current state of your dataframe (with regard to edits, not filtering)
Pretty much what the issue tittle says. For example use the below (e.g. in Jupyter Notebook):
Then filter column 'a' by those having value 'no'. Than delete the entries of column 'b'. A pandas warning on setting a value on a copy will appear, and as suggested when printing
df
Column 'b' will still show contents.
The text was updated successfully, but these errors were encountered: