Skip to content

DOC: Validating that the word pandas is correctly capitalized #32613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
591cdc6
Fixed wrong diff
joybh98 Mar 17, 2020
4665b01
added requested changes
joybh98 Mar 24, 2020
019544a
added -R and PANDAS
joybh98 Mar 31, 2020
0fbdf48
CI: add doctest check for done modules (#33175)
ShaharNaveh Mar 31, 2020
927dedb
REF: .get tests (#33164)
jbrockmendel Mar 31, 2020
eab7226
CLN: using C-API of datetime (#33174)
ShaharNaveh Mar 31, 2020
e56d395
DOC: Partial fix SA04 errors in docstrings #28792 (feedback needed) (…
Mar 31, 2020
cc3f3eb
REF: fillna tests (#33183)
jbrockmendel Mar 31, 2020
4d0eef6
Json parametrize more2 (#33163)
WillAyd Mar 31, 2020
cb41651
CLN: use ._data less in reshape (#33159)
jbrockmendel Mar 31, 2020
51f114b
BUG: isna_old with td64, dt64tz, period (#33158)
jbrockmendel Mar 31, 2020
aa71c21
REF: .drop tests (#33156)
jbrockmendel Mar 31, 2020
a7dd3ea
REF: test_reindex_like (#33150)
jbrockmendel Mar 31, 2020
f10ec59
BUG: create new MI from MultiIndex._get_level_values (#33134)
topper-123 Mar 31, 2020
6a8aca9
BUG: to_datetime with infer_datetime_format dropped timezone names (#…
mroeschke Mar 31, 2020
c166013
DOC: Fix capitalization of doc section headers (#33149)
themien Mar 31, 2020
a6c610d
DOC: Fix capitalization of docs section headers (#32944)
themien Mar 31, 2020
8305a85
DOC: Fix PR06 (type names) in docstrings (#33093)
farhanreynaldo Mar 31, 2020
98a2aa3
TST: cover search_sorted scalar mixed timezones case (#33185)
jamescobonkerr Mar 31, 2020
f148cb7
DOC: Added docstring for show_versions() (#33073)
MarianD Mar 31, 2020
cbd1103
REF: set_axis tests (#33189)
jbrockmendel Mar 31, 2020
1357114
ENH/VIZ: Allowing `s` parameter of scatter plots to be a column name …
SultanOrazbayev Mar 31, 2020
f303665
misplaced sort-index test (#33191)
jbrockmendel Apr 1, 2020
af0c878
Correct docstring to describe actual functionality. (#33190)
tv3141 Apr 1, 2020
d8d1dc9
REF/CLN: test_get_dummies (#33184)
jbrockmendel Apr 1, 2020
49bc8d8
TYP: require _update_inplace gets Frame/Series, never BlockManager (#…
jbrockmendel Apr 1, 2020
8c73b5f
fixed merge conflicts
joybh98 Apr 1, 2020
6daedb0
All changes in a single commit
joybh98 Apr 1, 2020
b332532
fixed merge conflict in test_unstack.py
joybh98 Apr 1, 2020
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
13 changes: 11 additions & 2 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
invgrep -RI --exclude=\*.{svg,c,cpp,html,js} --exclude-dir=env "\s$" *
RET=$(($RET + $?)) ; echo $MSG "DONE"
unset INVGREP_APPEND

# Check if pandas is referenced as pandas, not *pandas*,Pandas or PANDAS
MSG='Checking if the pandas word reference is always used lowercase (pandas,not Pandas or PANDAS' ; echo $MSG
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@datapythonista I forgot to add ) on line 234, please let me know if everything else besides this right or not.

invgrep -R '*pandas*|Pandas|PANDAS' web/* doc/
RET=$(($RET + $?)) ; echo $MSG "DONE"
fi

### CODE ###
Expand Down Expand Up @@ -279,8 +284,8 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
pytest -q --doctest-modules pandas/core/groupby/groupby.py -k"-cumcount -describe -pipe"
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Doctests datetimes.py' ; echo $MSG
pytest -q --doctest-modules pandas/core/tools/datetimes.py
MSG='Doctests tools' ; echo $MSG
pytest -q --doctest-modules pandas/core/tools/
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Doctests reshaping functions' ; echo $MSG
Expand Down Expand Up @@ -323,6 +328,10 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
MSG='Doctests tseries' ; echo $MSG
pytest -q --doctest-modules pandas/tseries/
RET=$(($RET + $?)) ; echo $MSG "DONE"

MSG='Doctests computation' ; echo $MSG
pytest -q --doctest-modules pandas/core/computation/
RET=$(($RET + $?)) ; echo $MSG "DONE"
fi

### DOCSTRINGS ###
Expand Down
16 changes: 8 additions & 8 deletions doc/source/development/contributing_docstring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ backticks. The following are considered inline code:

.. _docstring.short_summary:

Section 1: Short summary
Section 1: short summary
~~~~~~~~~~~~~~~~~~~~~~~~

The short summary is a single sentence that expresses what the function does in
Expand Down Expand Up @@ -228,7 +228,7 @@ infinitive verb.

.. _docstring.extended_summary:

Section 2: Extended summary
Section 2: extended summary
~~~~~~~~~~~~~~~~~~~~~~~~~~~

The extended summary provides details on what the function does. It should not
Expand Down Expand Up @@ -259,7 +259,7 @@ their use cases, if it is not too generic.

.. _docstring.parameters:

Section 3: Parameters
Section 3: parameters
~~~~~~~~~~~~~~~~~~~~~

The details of the parameters will be added in this section. This section has
Expand Down Expand Up @@ -424,7 +424,7 @@ For axis, the convention is to use something like:

.. _docstring.returns:

Section 4: Returns or Yields
Section 4: returns or yields
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If the method returns a value, it will be documented in this section. Also
Expand Down Expand Up @@ -505,7 +505,7 @@ If the method yields its value:

.. _docstring.see_also:

Section 5: See Also
Section 5: see also
~~~~~~~~~~~~~~~~~~~

This section is used to let users know about pandas functionality
Expand Down Expand Up @@ -583,7 +583,7 @@ For example:

.. _docstring.notes:

Section 6: Notes
Section 6: notes
~~~~~~~~~~~~~~~~

This is an optional section used for notes about the implementation of the
Expand All @@ -597,7 +597,7 @@ This section follows the same format as the extended summary section.

.. _docstring.examples:

Section 7: Examples
Section 7: examples
~~~~~~~~~~~~~~~~~~~

This is one of the most important sections of a docstring, despite being
Expand Down Expand Up @@ -998,4 +998,4 @@ mapping function names to docstrings. Wherever possible, we prefer using

See ``pandas.core.generic.NDFrame.fillna`` for an example template, and
``pandas.core.series.Series.fillna`` and ``pandas.core.generic.frame.fillna``
for the filled versions.
for the filled versions.
6 changes: 3 additions & 3 deletions doc/source/development/developer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ for each column, *including the index columns*. This has JSON form:

See below for the detailed specification for these.

Index Metadata Descriptors
Index metadata descriptors
~~~~~~~~~~~~~~~~~~~~~~~~~~

``RangeIndex`` can be stored as metadata only, not requiring serialization. The
Expand All @@ -89,7 +89,7 @@ with other column names) a disambiguating name with pattern matching
columns, ``name`` attribute is always stored in the column descriptors as
above.

Column Metadata
Column metadata
~~~~~~~~~~~~~~~

``pandas_type`` is the logical type of the column, and is one of:
Expand Down Expand Up @@ -182,4 +182,4 @@ As an example of fully-formed metadata:
'creator': {
'library': 'pyarrow',
'version': '0.13.0'
}}
}}
4 changes: 2 additions & 2 deletions doc/source/development/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ will

.. _extending.extension.ufunc:

NumPy Universal Functions
NumPy universal functions
^^^^^^^^^^^^^^^^^^^^^^^^^

:class:`Series` implements ``__array_ufunc__``. As part of the implementation,
Expand Down Expand Up @@ -501,4 +501,4 @@ registers the default "matplotlib" backend as follows.


More information on how to implement a third-party plotting backend can be found at
https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/__init__.py#L1.
https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/__init__.py#L1.
12 changes: 6 additions & 6 deletions doc/source/development/maintaining.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _maintaining:

******************
Pandas Maintenance
pandas maintenance
******************

This guide is for pandas' maintainers. It may also be interesting to contributors
Expand Down Expand Up @@ -41,7 +41,7 @@ reading.

.. _maintaining.triage:

Issue Triage
Issue triage
------------


Expand Down Expand Up @@ -123,7 +123,7 @@ Here's a typical workflow for triaging a newly opened issue.

.. _maintaining.closing:

Closing Issues
Closing issues
--------------

Be delicate here: many people interpret closing an issue as us saying that the
Expand All @@ -132,7 +132,7 @@ respond or self-close their issue if it's determined that the behavior is not a
or the feature is out of scope. Sometimes reporters just go away though, and
we'll close the issue after the conversation has died.

Reviewing Pull Requests
Reviewing pull requests
-----------------------

Anybody can review a pull request: regular contributors, triagers, or core-team
Expand All @@ -144,7 +144,7 @@ members. Here are some guidelines to check.
* User-facing changes should have a whatsnew in the appropriate file.
* Regression tests should reference the original GitHub issue number like ``# GH-1234``.

Cleaning up old Issues
Cleaning up old issues
----------------------

Every open issue in pandas has a cost. Open issues make finding duplicates harder,
Expand All @@ -164,7 +164,7 @@ If an older issue lacks a reproducible example, label it as "Needs Info" and
ask them to provide one (or write one yourself if possible). If one isn't
provide reasonably soon, close it according to the policies in :ref:`maintaining.closing`.

Cleaning up old Pull Requests
Cleaning up old pull requests
-----------------------------

Occasionally, contributors are unable to finish off a pull request.
Expand Down
3 changes: 1 addition & 2 deletions doc/source/development/meeting.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _meeting:

==================
Developer Meetings
Developer meetings
==================

We hold regular developer meetings on the second Wednesday
Expand Down Expand Up @@ -29,4 +29,3 @@ You can subscribe to this calendar with the following links:

Additionally, we'll sometimes have one-off meetings on specific topics.
These will be published on the same calendar.

8 changes: 8 additions & 0 deletions doc/source/reference/general_utility_functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,11 @@ Scalar introspection
api.types.is_re
api.types.is_re_compilable
api.types.is_scalar

Bug report function
-------------------
.. autosummary::
:toctree: api/

show_versions

2 changes: 1 addition & 1 deletion doc/source/user_guide/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ More information can be found in the `ipython documentation

.. _options.frequently_used:

Frequently Used Options
Frequently used options
-----------------------
The following is a walk-through of the more frequently used display options.

Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/reshaping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ the right thing:

.. _reshaping.melt:

Reshaping by Melt
Reshaping by melt
-----------------

.. image:: ../_static/reshaping_melt.png
Expand Down
6 changes: 3 additions & 3 deletions doc/source/user_guide/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Working with text data

.. _text.types:

Text Data Types
Text data types
---------------

.. versionadded:: 1.0.0
Expand Down Expand Up @@ -113,7 +113,7 @@ Everything else that follows in the rest of this document applies equally to

.. _text.string_methods:

String Methods
String methods
--------------

Series and Index are equipped with a set of string processing methods
Expand Down Expand Up @@ -633,7 +633,7 @@ same result as a ``Series.str.extractall`` with a default index (starts from 0).
pd.Series(["a1a2", "b1", "c1"], dtype="string").str.extractall(two_groups)


Testing for Strings that match or contain a pattern
Testing for strings that match or contain a pattern
---------------------------------------------------

You can check whether elements contain a pattern:
Expand Down
4 changes: 2 additions & 2 deletions doc/source/user_guide/timeseries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ as ``np.nan`` does for float data.

.. _timeseries.representation:

Timestamps vs. Time Spans
Timestamps vs. time spans
-------------------------

Timestamped data is the most basic type of time series data that associates
Expand Down Expand Up @@ -1434,7 +1434,7 @@ or calendars with additional rules.

.. _timeseries.advanced_datetime:

Time Series-Related Instance Methods
Time series-related instance methods
------------------------------------

Shifting / lagging
Expand Down
4 changes: 2 additions & 2 deletions doc/source/user_guide/visualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ before plotting.

.. _visualization.tools:

Plotting Tools
Plotting tools
--------------

These functions can be imported from ``pandas.plotting``
Expand Down Expand Up @@ -1045,7 +1045,7 @@ for more information.

.. _visualization.formatting:

Plot Formatting
Plot formatting
---------------

Setting the plot style
Expand Down
3 changes: 2 additions & 1 deletion doc/source/whatsnew/v1.1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ Timedelta
Timezones
^^^^^^^^^

-
- Bug in :func:`to_datetime` with ``infer_datetime_format=True`` where timezone names (e.g. ``UTC``) would not be parsed correctly (:issue:`33133`)
-


Expand Down Expand Up @@ -471,6 +471,7 @@ Other
- Fixed bug in :func:`pandas.testing.assert_series_equal` where dtypes were checked for ``Interval`` and ``ExtensionArray`` operands when ``check_dtype`` was ``False`` (:issue:`32747`)
- Bug in :meth:`Series.map` not raising on invalid ``na_action`` (:issue:`32815`)
- Bug in :meth:`DataFrame.__dir__` caused a segfault when using unicode surrogates in a column name (:issue:`25509`)
- Bug in :meth:`DataFrame.plot.scatter` caused an error when plotting variable marker sizes (:issue:`32904`)

.. ---------------------------------------------------------------------------

Expand Down
5 changes: 2 additions & 3 deletions pandas/_libs/tslibs/conversion.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ cnp.import_array()
import pytz

# stdlib datetime imports
from datetime import time as datetime_time
from cpython.datetime cimport (datetime, tzinfo,
from cpython.datetime cimport (datetime, time, tzinfo,
PyDateTime_Check, PyDate_Check,
PyDateTime_IMPORT)
PyDateTime_IMPORT
Expand Down Expand Up @@ -284,7 +283,7 @@ cdef convert_to_tsobject(object ts, object tz, object unit,
return convert_datetime_to_tsobject(ts, tz, nanos)
elif PyDate_Check(ts):
# Keep the converter same as PyDateTime's
ts = datetime.combine(ts, datetime_time())
ts = datetime.combine(ts, time())
return convert_datetime_to_tsobject(ts, tz)
elif getattr(ts, '_typ', None) == 'period':
raise ValueError("Cannot convert Period to Timestamp "
Expand Down
2 changes: 1 addition & 1 deletion pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ class _BaseOffset:

def _validate_n(self, n):
"""
Require that `n` be a nonzero integer.
Require that `n` be an integer.

Parameters
----------
Expand Down
1 change: 1 addition & 0 deletions pandas/_libs/tslibs/parsing.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,7 @@ def _guess_datetime_format(dt_str, dayfirst=False, dt_str_parse=du_parse,
(('second',), '%S', 2),
(('microsecond',), '%f', 6),
(('second', 'microsecond'), '%S.%f', 0),
(('tzinfo',), '%Z', 0),
]

if dayfirst:
Expand Down
3 changes: 1 addition & 2 deletions pandas/_libs/tslibs/period.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from datetime import datetime

from cpython.object cimport PyObject_RichCompareBool, Py_EQ, Py_NE

from numpy cimport int64_t, import_array, ndarray
Expand All @@ -13,6 +11,7 @@ from libc.string cimport strlen, memset
import cython

from cpython.datetime cimport (
datetime,
PyDate_Check,
PyDateTime_Check,
PyDateTime_IMPORT,
Expand Down
Loading