0

How I can get dataframe out of @interact function for next cell? My interact function looks something like this:

@interact(eutPlace=eutPlaces)
def selectByEut (eutPlace):
    rdsTable = tabelSisse.drop(['Id', 'Serial_number', 'User_modified'], axis='columns')
    rdsTable = rdsTable.loc[rdsTable['EUT_place'] == eutPlace]
    print(rdsTable.shape)
    return rdsTable

1 Answer 1

1

Found one solution. Use interactive instead of @interact.

def selectByEut (eutPlace):
    rdsTable = tabelSisse.drop(['Id', 'Serial_number', 'User_modified'], axis='columns')
    rdsTable = rdsTable.loc[rdsTable['EUT_place'] == eutPlace]
    display(rdsTable)
    return rdsTable

intrFilt = interactive(selectByEut, eutPlace=eutPlaces)
intrFilt

And in the next cell i can get the resulting dataframe with:

reducedTable = intrFilt.result
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.