Skip to content
Advertisement

yaml anchors definitions loading in PyYAML

I’m using PyYAML. Is there a way to define a YAML anchor in a way it won’t be a part of the data structure loaded by yaml.load (I can remove “wifi_parm” from the dictionary but looking for a smarter way)? example.yaml: load_example.py: prints: I need: Answer The anchor information in PyYAML is discarded before you get the result from yaml.load().

Get data points from Seaborn distplot

I use to plot a univariate distribution of observations. Still, I need not only the chart, but also the data points. How do I get the data points from matplotlib Axes (returned by distplot)? Answer You can use the matplotlib.patches API. For instance, to get the first line: This returns two numpy arrays containing the x and y values for

Advertisement