Nice little interactive data widget with accordion example.
import panel as pn
import param as pm
import numpy as np
import pandas as pd
import hvplot.pandas
class SimplePlotExample(pm.Parameterized):
import pandas as pd | |
import hvplot.pandas | |
df = pd.DataFrame({'x':range(10),'y':range(10), 'z':range(10)}) | |
df.hvplot.step(x='x').opts(legend_position='top_left') | |
df = pd.DataFrame({'x':range(10),'y':range(10),'z':range(10)}) | |
df.hvplot.line(x='x', legend='left') |
import param as pm | |
import panel as pn | |
import hvplot.pandas | |
import pandas as pd | |
import numpy as np | |
pn.extension() | |
class ResettableParameterized(pm.Parameterized): | |
def _reset(self): | |
with pm.parameterized.batch_call_watchers(self): |
import param as pm | |
import panel as pn | |
import hvplot.pandas | |
import pandas as pd | |
import numpy as np | |
pn.extension() | |
class Test(pm.Parameterized): | |
y = pm.Number(10, bounds=(0,20)) | |
def view(self): |
Nice little interactive data widget with accordion example.
import panel as pn
import param as pm
import numpy as np
import pandas as pd
import hvplot.pandas
class SimplePlotExample(pm.Parameterized):
Add the following to alacritty:
key_bindings:
- { key: I, mods: Control, chars: "\x1b[105;6u" }
Source: NvChad/NvChad#1551 (comment)
I'm looking for a canonical way of displaying the name property of dataframes when printing or logging.
Here is a module that overrides print with a method that prints dataframes with their names if they have the name property, and prints normally otherwise.
import builtins
import pandas as pd
import numpy as np | |
import pandas as pd | |
import hvplot.pandas | |
labels = list('ABC') | |
states = 4 | |
xs = 100 | |
df = pd.DataFrame({'x': len(labels)*states*list(range(xs)), 'label': [l for l in labels for _ in range(states*xs)], 'State': len(labels)*[s for s in list(range(states)) for _ in range(xs)], 'Value': 0.52+np.random.rand(len(labels)*states*xs)}) |
Turn Vim Spell On:
:set spell
You should now see miss-spelled words underlined.
Correcting Words:
Recommend Correct Spelling (while cursor is on word):
z=
import datashader as ds | |
import holoviews as hv | |
import hvplot.pandas | |
import numpy as np | |
import pandas as pd | |
import panel as pn | |
from holoviews.operation.datashader import datashade | |
# Sample data |