You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pandas/guide/pandas_docstring.html
+4
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,10 @@
33
33
34
34
<divclass="section" id="pandas-docstring-guide">
35
35
<spanid="docstring"></span><h1>pandas docstring guide<aclass="headerlink" href="#pandas-docstring-guide" title="Permalink to this headline">¶</a></h1>
36
+
<divclass="admonition note">
37
+
<pclass="first admonition-title">Note</p>
38
+
<pclass="last"><aclass="reference external" href="https://www.youtube.com/watch?v=EOA0lUeW4NI">Video tutorial: Pandas docstring guide</a> by Frank Akogun.</p>
<spanid="pandas-pr"></span><h1>Submitting your changes<aclass="headerlink" href="#submitting-your-changes" title="Permalink to this headline">¶</a></h1>
35
+
<divclass="admonition note">
36
+
<pclass="first admonition-title">Note</p>
37
+
<pclass="last"><aclass="reference external" href="https://www.youtube.com/watch?v=7eC3MjDIxNM">Video tutorial: Submitting docstring changes to GitHub</a> by Frank Akogun.</p>
38
+
</div>
44
39
<p>Once you finished the changes to your assigned docstring, you can follow the
45
40
instructions in this document in order to get your changes merged into pandas,
46
41
and released in the next version.</p>
@@ -49,12 +44,12 @@ <h2>1. Validate that your docstring does not have technical errors<a class="head
49
44
<p>There is a script in pandas that validates whether a docstring follows the
50
45
technical parts of the pandas docstring convention. To run the script,
<p>where <codeclass="docutils literal"><spanclass="pre"><your-function-or-method></span></code> is for example <codeclass="docutils literal"><spanclass="pre">pandas.DataFrame.head</span></code>,
57
-
<codeclass="docutils literal"><spanclass="pre">pandas.Series.tail</span></code> or <codeclass="docutils literal"><spanclass="pre">pandas.to_datetime</span></code>.</p>
51
+
<p>where <codeclass="docutils literal notranslate"><spanclass="pre"><your-function-or-method></span></code> is for example <codeclass="docutils literal notranslate"><spanclass="pre">pandas.DataFrame.head</span></code>,
52
+
<codeclass="docutils literal notranslate"><spanclass="pre">pandas.Series.tail</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">pandas.to_datetime</span></code>.</p>
58
53
<p>The output of the script will show the final docstring. In many cases just a
59
54
verbatim copy, but in some cases the docstring is implemented as a template,
60
55
and reused by more than one method or function, and this is useful to see
@@ -64,12 +59,12 @@ <h2>1. Validate that your docstring does not have technical errors<a class="head
64
59
missing dot at the end of a sentence, a blank line where it should not be, etc.</p>
65
60
<p>Finally, the output will also contain errors from running the examples.</p>
66
61
<p>With few exceptions, you should fix all the errors before continuing.</p>
67
-
<p>If you are changing a docstring in a cython file (with <codeclass="docutils literal"><spanclass="pre">.pyx</span></code> extension),
62
+
<p>If you are changing a docstring in a cython file (with <codeclass="docutils literal notranslate"><spanclass="pre">.pyx</span></code> extension),
68
63
you need to rebuild the pandas C extensions to be able to see the resulting
69
64
changes in the docstring and to validate the docstring with the command
<p>where <codeclass="docutils literal"><spanclass="pre"><your-function-or-method></span></code> follows the format described in the previous
84
+
<p>where <codeclass="docutils literal notranslate"><spanclass="pre"><your-function-or-method></span></code> follows the format described in the previous
<p>If the current branch is <codeclass="docutils literal"><spanclass="pre">master</span></code>, do not commit your changes, as you can get
105
+
<p>If the current branch is <codeclass="docutils literal notranslate"><spanclass="pre">master</span></code>, do not commit your changes, as you can get
111
106
into a situation where you need to undo your history in git, which is not
112
107
straightforward.</p>
113
108
<p>Then, get the latest upstream changes and commit your changes on top:</p>
<p>where <codeclass="docutils literal"><spanclass="pre"><modified-file(s)></span></code> is the file where you made your changes (in rare
121
-
cases it could be more than one file). And <codeclass="docutils literal"><spanclass="pre"><commit-message></span></code> is a short
115
+
<p>where <codeclass="docutils literal notranslate"><spanclass="pre"><modified-file(s)></span></code> is the file where you made your changes (in rare
116
+
cases it could be more than one file). And <codeclass="docutils literal notranslate"><spanclass="pre"><commit-message></span></code> is a short
122
117
description of your changes, starting by “DOC:” (e.g. “DOC: Improve the
123
118
docstring of DataFrame.head()”).</p>
124
119
</div>
@@ -128,7 +123,7 @@ <h2>5. Push your changes to pandas<a class="headerlink" href="#push-your-changes
128
123
pandas maintainers, so they can add them to the main pandas repository.</p>
129
124
<p>The first step is to push your local changes to your own fork, so they are
<p>Then, visit <aclass="reference external" href="https://github.com/pandas-dev/pandas">https://github.com/pandas-dev/pandas</a> in your browser, and click
@@ -142,12 +137,12 @@ <h2>5. Push your changes to pandas<a class="headerlink" href="#push-your-changes
142
137
we do not need to add/run tests or add a <cite>whatsnew</cite> entry. So you can ignore
143
138
these check boxes. Just verify that your changes respect the PEP-8 style by
0 commit comments