We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Trying to figure out what's an rx object and not by printing, but it ends up raising an error.
from io import BytesIO import pandas as pd import panel as pn pn.extension() @pn.cache def get_stocks(data): if data is None: stock_file = 'https://datasets.holoviz.org/stocks/v1/stocks.csv' else: stock_file = BytesIO(data) return pd.read_csv(stock_file, index_col='Date', parse_dates=True) file_input = pn.widgets.FileInput(sizing_mode='stretch_width') stocks = pn.rx(get_stocks)(file_input) selector = pn.widgets.MultiSelect( name='Select stocks', sizing_mode='stretch_width', options=stocks.columns.to_list() ) selected_stocks = stocks.rx.pipe( lambda df, cols: df[cols] if cols else df, selector ) print(selected_stocks)
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[3], line 28 19 selector = pn.widgets.MultiSelect( 20 name='Select stocks', sizing_mode='stretch_width', 21 options=stocks.columns.to_list() 22 ) 24 selected_stocks = stocks.rx.pipe( 25 lambda df, cols: df[cols] if cols else df, selector 26 ) ---> 28 print(selected_stocks) TypeError: __str__ returned non-string (type rx)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Trying to figure out what's an rx object and not by printing, but it ends up raising an error.
The text was updated successfully, but these errors were encountered: