我正在使用columns = sorted(data.columns)
discrete = [x for x in columns if data[x].dtype == object or len(data[x].unique()) < 6]
quantileable = [x for x in columns if x not in discrete or data[x].dtype == '<M8[ns]']
x = pnw.Select(name='X-Axis', value='date', options=quantileable)
y = pnw.Select(name='Y-Axis', value='height_g', options=quantileable)
size = pnw.Select(name='Size', value='None', options=['None'] + quantileable)
@pn.depends(x.param.value, y.param.value, size.param.value)
def create_figure(x, y, size):
if size != 'None':
opts['size'] = hv.dim(size).norm()*5
return hv.Curve(data, [x, y], label="%s vs %s" % (x.title(), y.title()))
widgets = pn.WidgetBox(x, y, size, width=200)
pn.Row(widgets, create_figure).servable('Cross-selector')
库加载一些html数据,但是当我尝试使用以下方法获取赛车手配置文件时遇到问题:
request
它输出加载屏幕的数据。
是否可以使用requests.get('https://nitrotype.com/race/insert_name_here')
库加载实际页面?
我尝试了其他库,但是它们都具有我根本不需要的缺点。