Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,10 @@ Building documentation
----------------------
Building Intel SDC User's Guide documentation requires pre-installed Intel SDC package along with compatible Pandas* version as well as Sphinx* 2.2.1 or later.

You can install Sphinx* using either ``conda`` or ``pip``:
Use ``pip`` to install Sphinx* and extensions:
::

conda install sphinx
pip install sphinx
pip install sphinx sphinxcontrib-programoutput

Currently the build precedure is based on ``make`` located at ``./sdc/docs/`` folder. While it is not generally required we recommended that you clean up the system from previous documentaiton build by running
::
Expand Down
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
'sphinx.ext.extlinks',
'sphinx.ext.githubpages',
'sphinx.ext.napoleon',
'sphinxcontrib.programoutput',
]


Expand Down
96 changes: 24 additions & 72 deletions sdc/datatypes/hpat_pandas_series_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@ def hpat_pandas_series_getitem(self, idx):
:caption: Getting Pandas Series elements
:name: ex_series_getitem

.. code-block:: console

> python ./series_getitem.py
55
.. command-output:: python ./series_getitem.py
:cwd: ../../../examples

.. todo:: Fix SDC behavior and add the expected output of the > python ./series_getitem.py to the docstring

Expand Down Expand Up @@ -411,14 +409,8 @@ def hpat_pandas_series_value_counts(self, normalize=False, sort=True, ascending=
:caption: Getting the number of values excluding NaNs
:name: ex_series_value_counts

.. code-block:: console

> python ./series/series_value_counts.py
3.0 2
4.0 1
2.0 1
1.0 1
dtype: int64
.. command-output:: python ./series/series_value_counts.py
:cwd: ../../../examples

.. note::

Expand Down Expand Up @@ -724,15 +716,8 @@ def hpat_pandas_series_rolling(self, window, min_periods=None, center=False,
:caption: Calculate the rolling minimum.
:name: ex_series_rolling

.. code-block:: console

> python ./series_rolling_min.py
0 NaN
1 NaN
2 3.0
3 2.0
4 2.0
dtype: float64
.. command-output:: python ./series/rolling/series_rolling_min.py
:cwd: ../../../examples

.. todo:: Add support of parameters ``center``, ``win_type``, ``on``, ``axis`` and ``closed``

Expand Down Expand Up @@ -1752,13 +1737,8 @@ def hpat_pandas_series_add(self, other, level=None, fill_value=None, axis=0):
:caption: Getting the addition of Series and other
:name: ex_series_add

.. code-block:: console

> python ./series/series_add.py
0 5
1 7
2 9
dtype: int64
.. command-output:: python ./series/series_add.py
:cwd: ../../../examples

.. note::

Expand Down Expand Up @@ -2119,13 +2099,8 @@ def hpat_pandas_series_mul(self, other, level=None, fill_value=None, axis=0):
:caption: Element-wise multiplication of two Series
:name: ex_series_mul

.. code-block:: console

> python ./series/series_mul.py
0 0
1 3
2 200
dtype: int64
.. command-output:: python ./series/series_mul.py
:cwd: ../../../examples

.. note::

Expand Down Expand Up @@ -2218,13 +2193,8 @@ def hpat_pandas_series_div(self, other, level=None, fill_value=None, axis=0):
:caption: Element-wise division of one Series by another (binary operator div)
:name: ex_series_div

.. code-block:: console

> python ./series/series_div.py
0 0.25
1 0.50
2 0.25
dtype: float64
.. command-output:: python ./series/series_div.py
:cwd: ../../../examples

.. note::

Expand Down Expand Up @@ -2318,13 +2288,8 @@ def hpat_pandas_series_truediv(self, other, level=None, fill_value=None, axis=0)
:caption: Element-wise division of one Series by another (binary operator truediv)
:name: ex_series_truediv

.. code-block:: console

> python ./series/series_truediv.py
0 0.25
1 0.50
2 0.25
dtype: float64
.. command-output:: python ./series/series_truediv.py
:cwd: ../../../examples

.. note::

Expand Down Expand Up @@ -2623,10 +2588,8 @@ def hpat_pandas_series_quantile(self, q=0.5, interpolation='linear'):
:caption: Computing quantile for the Series
:name: ex_series_quantile

.. code-block:: console

> python ./series/series_quantile.py
2.5
.. command-output:: python ./series/series_quantile.py
:cwd: ../../../examples

.. note::

Expand Down Expand Up @@ -2811,10 +2774,8 @@ def hpat_pandas_series_max(self, axis=None, skipna=True, level=None, numeric_onl
:caption: Getting the maximum value of Series elements
:name: ex_series_max

.. code-block:: console

> python ./series/series_max.py
4
.. command-output:: python ./series/series_max.py
:cwd: ../../../examples

.. note::

Expand Down Expand Up @@ -3452,13 +3413,8 @@ def hpat_pandas_series_abs(self):
:caption: Getting the absolute value of each element in Series
:name: ex_series_abs

.. code-block:: console

> python ./series/series_abs.py
0 1.10
1 2.00
2 3.33
dtype: float64
.. command-output:: python ./series/series_abs.py
:cwd: ../../../examples

.. seealso::

Expand Down Expand Up @@ -3513,10 +3469,8 @@ def hpat_pandas_series_unique(self):
:caption: Getting unique values in Series
:name: ex_series_unique

.. code-block:: console

> python ./series/series_unique.py
array([2, 1, 3], dtype=int64)
.. command-output:: python ./series/series_unique.py
:cwd: ../../../examples

Intel Scalable Dataframe Compiler Developer Guide
*************************************************
Expand Down Expand Up @@ -3694,10 +3648,8 @@ def hpat_pandas_series_count(self, level=None):
:caption: Counting non-NaN values in Series
:name: ex_series_count

.. code-block:: console

> python ./series/series_count.py
2
.. command-output:: python ./series/series_count.py
:cwd: ../../../examples

.. note::

Expand Down
112 changes: 10 additions & 102 deletions sdc/datatypes/hpat_pandas_series_rolling_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@
:caption: {example_caption}
:name: ex_series_rolling_{method_name}

.. code-block:: console

> python ./series_rolling_{method_name}.py{example_result}
.. command-output:: python ./series/rolling/series_rolling_{method_name}.py
:cwd: ../../../examples

.. seealso::
:ref:`Series.rolling <pandas.Series.rolling>`
Expand Down Expand Up @@ -328,15 +327,8 @@ def hpat_pandas_series_rolling_count(self):
:caption: Count of any non-NaN observations inside the window.
:name: ex_series_rolling_count

.. code-block:: console

> python ./series_rolling_count.py
0 1.0
1 2.0
2 3.0
3 2.0
4 2.0
dtype: float64
.. command-output:: python ./series/rolling/series_rolling_count.py
:cwd: ../../../examples

.. seealso::
:ref:`Series.rolling <pandas.Series.rolling>`
Expand Down Expand Up @@ -453,15 +445,8 @@ def hpat_pandas_series_rolling_max(self):
:caption: Calculate the rolling maximum.
:name: ex_series_rolling_max

.. code-block:: console

> python ./series_rolling_max.py
0 NaN
1 NaN
2 5.0
3 5.0
4 6.0
dtype: float64
.. command-output:: python ./series/rolling/series_rolling_max.py
:cwd: ../../../examples

.. seealso::
:ref:`Series.rolling <pandas.Series.rolling>`
Expand Down Expand Up @@ -532,15 +517,8 @@ def hpat_pandas_series_rolling_min(self):
:caption: Calculate the rolling minimum.
:name: ex_series_rolling_min

.. code-block:: console

> python ./series_rolling_min.py
0 NaN
1 NaN
2 3.0
3 2.0
4 2.0
dtype: float64
.. command-output:: python ./series/rolling/series_rolling_min.py
:cwd: ../../../examples

.. seealso::
:ref:`Series.rolling <pandas.Series.rolling>`
Expand Down Expand Up @@ -645,15 +623,8 @@ def hpat_pandas_series_rolling_sum(self):
:caption: Calculate rolling sum of given Series.
:name: ex_series_rolling_sum

.. code-block:: console

> python ./series_rolling_sum.py
0 NaN
1 NaN
2 12.0
3 10.0
4 13.0
dtype: float64
.. command-output:: python ./series/rolling/series_rolling_sum.py
:cwd: ../../../examples

.. seealso::
:ref:`Series.rolling <pandas.Series.rolling>`
Expand Down Expand Up @@ -772,15 +743,6 @@ def culc_var(arr, ddof, minp):
hpat_pandas_series_rolling_corr.__doc__ = hpat_pandas_series_rolling_docstring_tmpl.format(**{
'method_name': 'corr',
'example_caption': 'Calculate rolling correlation.',
'example_result':
"""
0 NaN
1 NaN
2 NaN
3 0.333333
4 0.916949
dtype: float64
""",
'limitations_block':
"""
Limitations
Expand All @@ -800,15 +762,6 @@ def culc_var(arr, ddof, minp):
hpat_pandas_series_rolling_cov.__doc__ = hpat_pandas_series_rolling_docstring_tmpl.format(**{
'method_name': 'cov',
'example_caption': 'Calculate rolling covariance.',
'example_result':
"""
0 NaN
1 NaN
2 NaN
3 0.166667
4 4.333333
dtype: float64
""",
'limitations_block':
"""
Limitations
Expand All @@ -830,15 +783,6 @@ def culc_var(arr, ddof, minp):
hpat_pandas_series_rolling_mean.__doc__ = hpat_pandas_series_rolling_docstring_tmpl.format(**{
'method_name': 'mean',
'example_caption': 'Calculate the rolling mean of the values.',
'example_result':
"""
0 NaN
1 NaN
2 4.000000
3 3.333333
4 4.333333
dtype: float64
""",
'limitations_block':
"""
Limitations
Expand All @@ -851,31 +795,13 @@ def culc_var(arr, ddof, minp):
hpat_pandas_series_rolling_median.__doc__ = hpat_pandas_series_rolling_docstring_tmpl.format(**{
'method_name': 'median',
'example_caption': 'Calculate the rolling median.',
'example_result':
"""
0 NaN
1 NaN
2 4.0
3 3.0
4 5.0
dtype: float64
""",
'limitations_block': '',
'extra_params': ''
})

hpat_pandas_series_rolling_quantile.__doc__ = hpat_pandas_series_rolling_docstring_tmpl.format(**{
'method_name': 'quantile',
'example_caption': 'Calculate the rolling quantile.',
'example_result':
"""
0 NaN
1 NaN
2 3.5
3 2.5
4 3.5
dtype: float64
""",
'limitations_block':
"""
Limitations
Expand All @@ -895,15 +821,6 @@ def culc_var(arr, ddof, minp):
hpat_pandas_series_rolling_std.__doc__ = hpat_pandas_series_rolling_docstring_tmpl.format(**{
'method_name': 'std',
'example_caption': 'Calculate rolling standard deviation.',
'example_result':
"""
0 NaN
1 NaN
2 1.000000
3 1.527525
4 2.081666
dtype: float64
""",
'limitations_block':
"""
Limitations
Expand All @@ -920,15 +837,6 @@ def culc_var(arr, ddof, minp):
hpat_pandas_series_rolling_var.__doc__ = hpat_pandas_series_rolling_docstring_tmpl.format(**{
'method_name': 'var',
'example_caption': 'Calculate unbiased rolling variance.',
'example_result':
"""
0 NaN
1 NaN
2 1.000000
3 2.333333
4 4.333333
dtype: float64
""",
'limitations_block':
"""
Limitations
Expand Down
Loading