Permalink
Browse files

Merge tag 'v0.17.1' into debian

Version 0.17.1

* tag 'v0.17.1': (168 commits)
  add nbviewer link
  Revert "DOC: fix sponsor notice"
  DOC: a few touchups
  DOC: fix sponsor notice
  DOC: warnings and remove HTML
  COMPAT: compat of scalars on all platforms, xref pandas-dev#11638
  DOC: fix build errors/warnings
  DOC: whatsnew edits
  DOC: fix link syntax
  DOC: update release.rst / whatsnew edits
  BUG: fix col iteration in DataFrame.round, pandas-dev#11611
  DOC: Clarify foramtting
  BUG: pandas-dev#11638 return correct dtype for int and float
  BUG: pandas-dev#11637 fix to_csv incorrect output.
  DOC: sponsor notice
  BUG: indexing with a range , pandas-dev#11652
  Fix link to numexpr
  ENH: fixup tilde expansion, xref pandas-dev#11438
  ENH: tilde expansion for write output formatting functions, pandas-dev#11438
  DOC: fix up doc-string creations in generic.py
  ...
  • Loading branch information...
yarikoptic committed Nov 27, 2015
2 parents 6680858 + 6c30cbe commit 9b2e35f9cb979758262e0c7177709616b88e29f7
Showing with 31,168 additions and 3,688 deletions.
  1. +217 −342 CONTRIBUTING.md
  2. +1 −0 asv_bench/asv.conf.json
  3. +15 −0 asv_bench/benchmarks/categoricals.py
  4. +48 −1 asv_bench/benchmarks/frame_methods.py
  5. +169 −0 asv_bench/benchmarks/gil.py
  6. +16 −0 asv_bench/benchmarks/groupby.py
  7. +34 −0 asv_bench/benchmarks/series_methods.py
  8. +27 −2 asv_bench/benchmarks/stat_ops.py
  9. +20 −0 build_dist.sh
  10. +1 −2 ci/install_conda.sh
  11. +1 −0 ci/requirements-2.6.run
  12. +2 −0 ci/requirements-2.7.pip
  13. +1 −0 ci/requirements-2.7.run
  14. 0 ci/requirements-2.7_SLOW.pip
  15. +1 −0 ci/requirements-3.3.run
  16. +1 −0 ci/requirements-3.4.build
  17. +1 −0 ci/requirements-3.4.run
  18. +1 −0 ci/requirements-3.4_SLOW.run
  19. +1 −1 ci/requirements-3.5.build
  20. +2 −1 ci/requirements-3.5.run
  21. +1 −0 ci/requirements_all.txt
  22. +2 −2 conda.recipe/meta.yaml
  23. +3 −0 doc/make.py
  24. +1 −1 doc/source/10min.rst
  25. +1 −1 doc/source/advanced.rst
  26. +53 −0 doc/source/api.rst
  27. +19 −10 doc/source/basics.rst
  28. +47 −1 doc/source/categorical.rst
  29. +88 −47 doc/source/computation.rst
  30. +3 −2 doc/source/conf.py
  31. +203 −195 doc/source/contributing.rst
  32. +51 −1 doc/source/cookbook.rst
  33. +3 −3 doc/source/enhancingperf.rst
  34. +10 −0 doc/source/faq.rst
  35. +6 −5 doc/source/groupby.rst
  36. +21,077 −0 doc/source/html-styling.ipynb
  37. +1 −0 doc/source/index.rst.template
  38. +27 −2 doc/source/indexing.rst
  39. +2 −1 doc/source/install.rst
  40. +34 −5 doc/source/io.rst
  41. +82 −0 doc/source/release.rst
  42. +1 −1 doc/source/remote_data.rst
  43. +10 −0 doc/source/style.rst
  44. +17 −0 doc/source/text.rst
  45. +13 −0 doc/source/themes/nature_with_gtoc/static/nature.css_t
  46. +1 −1 doc/source/timedeltas.rst
  47. +6 −1 doc/source/timeseries.rst
  48. +6 −6 doc/source/visualization.rst
  49. +23 −11 doc/source/whatsnew/v0.12.0.txt
  50. +2 −1 doc/source/whatsnew/v0.17.0.txt
  51. +152 −24 doc/source/whatsnew/v0.17.1.txt
  52. +873 −0 doc/source/whatsnew/whatsnew_0171_html_table.html
  53. +355 −406 pandas/algos.pyx
  54. +2 −2 pandas/computation/expr.py
  55. +1 −1 pandas/computation/pytables.py
  56. +18 −1 pandas/computation/tests/test_eval.py
  57. +55 −36 pandas/core/base.py
  58. +42 −13 pandas/core/categorical.py
  59. +57 −541 pandas/core/common.py
  60. +3 −3 pandas/core/config_init.py
  61. +1 −1 pandas/core/dtypes.py
  62. +23 −14 pandas/core/format.py
  63. +115 −49 pandas/core/frame.py
  64. +391 −209 pandas/core/generic.py
  65. +170 −56 pandas/core/groupby.py
  66. +183 −60 pandas/core/index.py
  67. +77 −5 pandas/core/indexing.py
  68. +408 −278 pandas/core/internals.py
  69. +390 −0 pandas/core/missing.py
  70. +18 −49 pandas/core/nanops.py
  71. +1 −1 pandas/core/ops.py
  72. +71 −60 pandas/core/panel.py
  73. +64 −19 pandas/core/series.py
  74. +115 −48 pandas/core/strings.py
  75. +749 −0 pandas/core/style.py
  76. +186 −2 pandas/io/common.py
  77. +1 −1 pandas/io/data.py
  78. +7 −2 pandas/io/excel.py
  79. +6 −0 pandas/io/ga.py
  80. +4 −2 pandas/io/gbq.py
  81. +22 −12 pandas/io/parsers.py
  82. +59 −39 pandas/io/pytables.py
  83. +10 −10 pandas/io/sql.py
  84. BIN pandas/io/tests/data/testmultiindex.xls
  85. BIN pandas/io/tests/data/testmultiindex.xlsm
  86. BIN pandas/io/tests/data/testmultiindex.xlsx
  87. BIN pandas/io/tests/data/testskiprows.xls
  88. BIN pandas/io/tests/data/testskiprows.xlsm
  89. BIN pandas/io/tests/data/testskiprows.xlsx
  90. +26 −0 pandas/io/tests/test_common.py
  91. +11 −5 pandas/io/tests/test_data.py
  92. +61 −6 pandas/io/tests/test_excel.py
  93. +7 −1 pandas/io/tests/test_ga.py
  94. +90 −44 pandas/io/tests/test_json/test_pandas.py
  95. +3 −3 pandas/io/tests/test_json/test_ujson.py
  96. +12 −11 pandas/io/tests/test_packers.py
  97. +28 −31 pandas/io/tests/test_parsers.py
  98. +47 −9 pandas/io/tests/test_pytables.py
  99. +4 −4 pandas/io/tests/test_sas.py
  100. +7 −2 pandas/io/tests/test_sql.py
  101. +3 −2 pandas/io/tests/test_stata.py
  102. +3 −1 pandas/io/tests/test_wb.py
  103. +30 −5 pandas/lib.pyx
  104. +184 −83 pandas/parser.pyx
  105. +1 −0 pandas/rpy/tests/test_common.py
  106. +15 −3 pandas/sparse/array.py
  107. +1 −1 pandas/sparse/frame.py
  108. +13 −0 pandas/sparse/tests/test_array.py
  109. +86 −66 pandas/sparse/tests/test_sparse.py
  110. +6 −4 pandas/src/datetime.pxd
  111. +140 −0 pandas/src/generate_code.py
  112. +135 −0 pandas/src/generated.pyx
  113. +4 −0 pandas/src/numpy_helper.h
  114. +28 −21 pandas/src/period.pyx
  115. +5 −6 pandas/src/period_helper.c
  116. +53 −36 pandas/src/skiplist.h
  117. +9 −8 pandas/src/skiplist.pxd
  118. +3 −3 pandas/src/ujson/lib/ultrajsondec.c
  119. +9 −6 pandas/stats/moments.py
  120. +0 −8 pandas/stats/tests/test_moments.py
  121. +111 −9 pandas/tests/test_base.py
  122. +223 −44 pandas/tests/test_categorical.py
  123. +72 −0 pandas/tests/test_common.py
  124. +10 −0 pandas/tests/test_dtypes.py
  125. +34 −3 pandas/tests/test_format.py
  126. +392 −61 pandas/tests/test_frame.py
  127. +42 −8 pandas/tests/test_generic.py
  128. +72 −0 pandas/tests/test_graphics.py
  129. +217 −31 pandas/tests/test_groupby.py
  130. +241 −33 pandas/tests/test_index.py
  131. +256 −125 pandas/tests/test_indexing.py
  132. +2 −2 pandas/tests/test_internals.py
  133. +14 −1 pandas/tests/test_lib.py
  134. +0 −2 pandas/tests/test_multilevel.py
  135. +7 −5 pandas/tests/test_nanops.py
  136. +30 −5 pandas/tests/test_panel.py
  137. +2 −2 pandas/tests/test_rplot.py
  138. +178 −16 pandas/tests/test_series.py
  139. +19 −7 pandas/tests/test_strings.py
  140. +381 −0 pandas/tests/test_style.py
  141. +19 −1 pandas/tests/test_testing.py
  142. +23 −20 pandas/tools/merge.py
  143. +63 −22 pandas/tools/pivot.py
  144. +11 −7 pandas/tools/plotting.py
  145. +85 −36 pandas/tools/tests/test_merge.py
  146. +111 −48 pandas/tools/tests/test_pivot.py
  147. +16 −4 pandas/tseries/base.py
  148. +27 −10 pandas/tseries/common.py
  149. +5 −4 pandas/tseries/frequencies.py
  150. +65 −28 pandas/tseries/holiday.py
  151. +42 −33 pandas/tseries/index.py
  152. +9 −5 pandas/tseries/period.py
  153. +26 −1 pandas/tseries/tests/test_base.py
  154. +66 −5 pandas/tseries/tests/test_holiday.py
  155. +41 −23 pandas/tseries/tests/test_timeseries.py
  156. +16 −0 pandas/tseries/tests/test_timezones.py
  157. +1 −0 pandas/tslib.pxd
  158. +163 −113 pandas/tslib.pyx
  159. +1 −0 pandas/util/print_versions.py
  160. +46 −14 pandas/util/testing.py
  161. +24 −1 setup.py

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -43,6 +43,7 @@
"numexpr": [],
"pytables": [],
"openpyxl": [],
"xlsxwriter": [],
"xlrd": [],
"xlwt": []
},
@@ -1,6 +1,7 @@
from .pandas_vb_common import *
import string
class concat_categorical(object):
goal_time = 0.2
@@ -26,6 +27,7 @@ def time_value_counts(self):
def time_value_counts_dropna(self):
self.ts.value_counts(dropna=True)
class categorical_constructor(object):
goal_time = 0.2
@@ -43,3 +45,16 @@ def time_regular_constructor(self):
def time_fastpath(self):
Categorical(self.codes, self.cat_idx, fastpath=True)
class categorical_rendering(object):
goal_time = 3e-3
def setup(self):
n = 1000
items = [str(i) for i in range(n)]
s = pd.Series(items, dtype='category')
df = pd.DataFrame({'C': s, 'data': np.random.randn(n)})
self.data = df[df.C == '20']
def time_rendering(self):
str(self.data.C)
@@ -582,7 +582,7 @@ def time_frame_interpolate_some_good_infer(self):
self.df.interpolate(downcast='infer')
class frame_isnull(object):
class frame_isnull_floats_no_null(object):
goal_time = 0.2
def setup(self):
@@ -593,6 +593,33 @@ def time_frame_isnull(self):
isnull(self.df)
class frame_isnull_floats(object):
goal_time = 0.2
def setup(self):
np.random.seed(1234)
self.sample = np.array([np.nan, 1.0])
self.data = np.random.choice(self.sample, (1000, 1000))
self.df = DataFrame(self.data)
def time_frame_isnull(self):
isnull(self.df)
class frame_isnull_obj(object):
goal_time = 0.2
def setup(self):
np.random.seed(1234)
self.sample = np.array([NaT, np.nan, None, np.datetime64('NaT'),
np.timedelta64('NaT'), 0, 1, 2.0, '', 'abcd'])
self.data = np.random.choice(self.sample, (1000, 1000))
self.df = DataFrame(self.data)
def time_frame_isnull(self):
isnull(self.df)
class frame_iteritems(object):
goal_time = 0.2
@@ -653,6 +680,16 @@ def j(self):
self.df3[0]
class frame_itertuples(object):
def setup(self):
self.df = DataFrame(np.random.randn(50000, 10))
def time_frame_itertuples(self):
for row in self.df.itertuples():
pass
class frame_mask_bools(object):
goal_time = 0.2
@@ -930,6 +967,16 @@ def time_frame_xs_row(self):
self.df.xs(50000)
class frame_sort_index(object):
goal_time = 0.2
def setup(self):
self.df = DataFrame(randn(1000000, 2), columns=list('AB'))
def time_frame_sort_index(self):
self.df.sort_index()
class series_string_vector_slice(object):
goal_time = 0.2
@@ -1,15 +1,24 @@
from .pandas_vb_common import *
from pandas.core import common as com
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
try:
from pandas.util.testing import test_parallel
have_real_test_parallel = True
except ImportError:
have_real_test_parallel = False
def test_parallel(num_threads=1):
def wrapper(fname):
return fname
return wrapper
@@ -320,3 +329,163 @@ def time_nogil_kth_smallest(self):
def run(arr):
algos.kth_smallest(arr, self.k)
run()
class nogil_datetime_fields(object):
goal_time = 0.2
def setup(self):
self.N = 100000000
self.dti = pd.date_range('1900-01-01', periods=self.N, freq='D')
self.period = self.dti.to_period('D')
if (not have_real_test_parallel):
raise NotImplementedError
def time_datetime_field_year(self):
@test_parallel(num_threads=2)
def run(dti):
dti.year
run(self.dti)
def time_datetime_field_day(self):
@test_parallel(num_threads=2)
def run(dti):
dti.day
run(self.dti)
def time_datetime_field_daysinmonth(self):
@test_parallel(num_threads=2)
def run(dti):
dti.days_in_month
run(self.dti)
def time_datetime_field_normalize(self):
@test_parallel(num_threads=2)
def run(dti):
dti.normalize()
run(self.dti)
def time_datetime_to_period(self):
@test_parallel(num_threads=2)
def run(dti):
dti.to_period('S')
run(self.dti)
def time_period_to_datetime(self):
@test_parallel(num_threads=2)
def run(period):
period.to_timestamp()
run(self.period)
class nogil_rolling_algos_slow(object):
goal_time = 0.2
def setup(self):
self.win = 100
np.random.seed(1234)
self.arr = np.random.rand(100000)
if (not have_real_test_parallel):
raise NotImplementedError
def time_nogil_rolling_median(self):
@test_parallel(num_threads=2)
def run(arr, win):
rolling_median(arr, win)
run(self.arr, self.win)
class nogil_rolling_algos_fast(object):
goal_time = 0.2
def setup(self):
self.win = 100
np.random.seed(1234)
self.arr = np.random.rand(1000000)
if (not have_real_test_parallel):
raise NotImplementedError
def time_nogil_rolling_mean(self):
@test_parallel(num_threads=2)
def run(arr, win):
rolling_mean(arr, win)
run(self.arr, self.win)
def time_nogil_rolling_min(self):
@test_parallel(num_threads=2)
def run(arr, win):
rolling_min(arr, win)
run(self.arr, self.win)
def time_nogil_rolling_max(self):
@test_parallel(num_threads=2)
def run(arr, win):
rolling_max(arr, win)
run(self.arr, self.win)
def time_nogil_rolling_var(self):
@test_parallel(num_threads=2)
def run(arr, win):
rolling_var(arr, win)
run(self.arr, self.win)
def time_nogil_rolling_skew(self):
@test_parallel(num_threads=2)
def run(arr, win):
rolling_skew(arr, win)
run(self.arr, self.win)
def time_nogil_rolling_kurt(self):
@test_parallel(num_threads=2)
def run(arr, win):
rolling_kurt(arr, win)
run(self.arr, self.win)
def time_nogil_rolling_std(self):
@test_parallel(num_threads=2)
def run(arr, win):
rolling_std(arr, win)
run(self.arr, self.win)
class nogil_read_csv(object):
number = 1
repeat = 5
def setup(self):
if (not have_real_test_parallel):
raise NotImplementedError
# Using the values
self.df = DataFrame(np.random.randn(10000, 50))
self.df.to_csv('__test__.csv')
self.rng = date_range('1/1/2000', periods=10000)
self.df_date_time = DataFrame(np.random.randn(10000, 50), index=self.rng)
self.df_date_time.to_csv('__test_datetime__.csv')
self.df_object = DataFrame('foo', index=self.df.index, columns=self.create_cols('object'))
self.df_object.to_csv('__test_object__.csv')
def create_cols(self, name):
return [('%s%03d' % (name, i)) for i in range(5)]
@test_parallel(num_threads=2)
def pg_read_csv(self):
read_csv('__test__.csv', sep=',', header=None, float_precision=None)
def time_nogil_read_csv(self):
self.pg_read_csv()
@test_parallel(num_threads=2)
def pg_read_csv_object(self):
read_csv('__test_object__.csv', sep=',')
def time_nogil_read_csv_object(self):
self.pg_read_csv_object()
@test_parallel(num_threads=2)
def pg_read_csv_datetime(self):
read_csv('__test_datetime__.csv', sep=',', header=None)
def time_nogil_read_csv_datetime(self):
self.pg_read_csv_datetime()
@@ -772,3 +772,19 @@ def setup(self):
def time_groupby_transform_series2(self):
self.df.groupby('id')['val'].transform(np.mean)
class groupby_transform_cythonized(object):
goal_time = 0.2
def setup(self):
np.random.seed(0)
self.df = DataFrame({'id': (np.arange(100000) / 3), 'val': np.random.randn(100000), })
def time_groupby_transform_cumprod(self):
self.df.groupby('id').cumprod()
def time_groupby_transform_cumsum(self):
self.df.groupby('id').cumsum()
def time_groupby_transform_shift(self):
self.df.groupby('id').shift()
@@ -1,6 +1,20 @@
from .pandas_vb_common import *
class series_constructor_no_data_datetime_index(object):
goal_time = 0.2
def setup(self):
self.dr = pd.date_range(
start=datetime(2015,10,26),
end=datetime(2016,1,1),
freq='10s'
) # ~500k long
def time_series_constructor_no_data_datetime_index(self):
Series(data=None, index=self.dr)
class series_isin_int64(object):
goal_time = 0.2
@@ -71,3 +85,23 @@ def setup(self):
def time_series_nsmallest2(self):
self.s2.nsmallest(3, take_last=True)
self.s2.nsmallest(3, take_last=False)
class series_dropna_int64(object):
goal_time = 0.2
def setup(self):
self.s = Series(np.random.randint(1, 10, 1000000))
def time_series_dropna_int64(self):
self.s.dropna()
class series_dropna_datetime(object):
goal_time = 0.2
def setup(self):
self.s = Series(pd.date_range('2000-01-01', freq='S', periods=1000000))
self.s[np.random.randint(1, 1000000, 100)] = pd.NaT
def time_series_dropna_datetime(self):
self.s.dropna()
Oops, something went wrong.

0 comments on commit 9b2e35f

Please sign in to comment.