Could you please tell me, why the results differ, when quantiles are calculated in pandas (Python) and R?
Pandas code:
print('p_new: {:>5} {:>5} {:>5}'.format(
round(self.pandas_data_frame['pending_new'].quantile(0.50), 2),
round(self.pandas_data_frame['pending_new'].quantile(0.95), 2),
round(self.pandas_data_frame['pending_new'].quantile(0.99), 2),
))
print('new: {:>5} {:>5} {:>5}'.format(
round(self.pandas_data_frame['new'].quantile(0.50), 2),
round(self.pandas_data_frame['new'].quantile(0.95), 2),
round(self.pandas_data_frame['new'].quantile(0.99), 2),
))
results:
name | .50| .95| .99|
p_new: 2.0 12.0 20.0
new: 52.0 78.0 106.06
R code:
dd = read.csv(“stats.csv”)
quantile(dd$pending_new, c(.50, .95, .99))
quantile(dd$new, c(.50, .95, .99))
results:
> quantile(dd$pending_new, c(.50, .95, .99))
50% 95% 99%
2.0 13.1 34.0
> quantile(dd$new, c(.50, .95, .99))
50% 95% 99%
52.00 81.00 129.26