I have a sample dataframe here (it's the pickle for the df
). When I do the following:
df = pd.read_pickle('test.pickle')
sns.tsplot(data=df.sort('time', ascending=True), time='time', unit='entity', condition='prior_type', value='perf')
I get the following output (nothing):
When I change it to use unit_traces
I can actually see the data
sns.tsplot(data=df.sort('time', ascending=True), time='time', unit='entity', condition='prior_type', value='perf', err_style='unit_traces')
My question is why can't I see the CI's? The data is a bit disjoint in some places but I would still think it should be able to come up with some sort of confidence band. Am I missing something here?
The default estimator (numpy.mean
) produces NaNs if there are missing data, which matplotlib simply avoids plotting (often helpful, but here possibly confusing). Using a nan-safe estimator, such as scipy.stats.nanmean
should work. Sorry that this is not more obvious in the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With