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: 0_preface.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -236,7 +236,7 @@ <h2>Changes in the second and third editions<a class="headerlink" href="#changes
236
236
workspaces in <aclass="reference internal" href="2_programs_in_files.html#workspaces"><spanclass="std std-numref">Section 2.2.1</span></a>, and the Flake8 extension in
237
237
<aclass="reference internal" href="4_style.html#flake8-extension"><spanclass="std std-numref">Section 4.2.2</span></a>. Together, these provide correctly integrated code
238
238
linting. It also consistently uses <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">python</span><spanclass="pre">-m</span></code> to invoke tools such as <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">pip</span></code>,
239
-
<aclass="reference external" href="https://docs.pytest.org/en/latest/index.html#module-pytest" title="(in pytest v8.5.0.dev130)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">pytest</span></code></a> and <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">flake8</span></code>. This is less error-prone for students. The description
239
+
<aclass="reference external" href="https://docs.pytest.org/en/latest/index.html#module-pytest" title="(in pytest v8.5.0.dev154)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">pytest</span></code></a> and <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">flake8</span></code>. This is less error-prone for students. The description
240
240
of <aclass="reference external" href="https://docs.python.org/3/reference/compound_stmts.html#finally" title="(in Python v3.13)"><codeclass="xref std std-keyword docutils literal notranslate"><spanclass="pre">finally</span></code></a> in <aclass="reference internal" href="6_exceptions.html#else-finally"><spanclass="std std-numref">Section 6.5.2</span></a> has been also improved.</p>
Copy file name to clipboardExpand all lines: 1_introduction.html
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -117,7 +117,7 @@
117
117
are:</p>
118
118
<blockquote>
119
119
<div><olclass="arabic simple">
120
-
<li><p>Python version 3.9 or later (3.11 or later recommended).</p></li>
120
+
<li><p>Python version 3.10 or later (3.13 or later recommended).</p></li>
121
121
<li><p>Git (the revision control system we’re going to use).</p></li>
122
122
<li><p>A Python-aware text editor or <aclass="reference internal" href="#term-integrated-development-environment"><spanclass="xref std std-term">integrated development
123
123
environment</span></a> (IDE). Visual Studio Code is recommended, and all the
<p>On the author’s computer, this prints <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Python</span><spanclass="pre">3.12.6</span></code>, which is the version of
164
+
<p>On the author’s computer, this prints <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Python</span><spanclass="pre">3.13.3</span></code>, which is the version of
165
165
Python I expect to be using. This means I can launch Python on Windows using
166
166
just <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">py</span></code>. If it printed a different version, then I could attempt to force it
<p>If that fails, then there is an issue with your Python documentation and you
172
172
need to go back to the start of this section to work out how to install the
173
173
right version.</p>
174
174
<p>On Mac or Linux, the safest way to ensure that you are running the right
175
-
version of Python is to use the full version number, e.g. <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">python3.12</span></code>. You can
175
+
version of Python is to use the full version number, e.g. <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">python3.13</span></code>. You can
<p>There are a number of Python packages which support code testing. The concepts
718
718
are largely similar so rather than get bogged down in the details of multiple
719
-
frameworks, we will introduce <aclass="reference external" href="https://docs.pytest.org/en/latest/index.html" title="(in pytest v8.5.0.dev130)"><spanclass="xref std std-doc">Pytest</span></a>, which is one of the
719
+
frameworks, we will introduce <aclass="reference external" href="https://docs.pytest.org/en/latest/index.html" title="(in pytest v8.5.0.dev154)"><spanclass="xref std std-doc">Pytest</span></a>, which is one of the
720
720
most widely used. Pytest is simply a Python package, so you can install it into
because it’s a very useful tool for applied mathematicians and statisticians
78
78
who need to work with real data, and partly because it’s a convenient somewhat
79
79
larger library on which to practice tools and techniques for debugging.</p>
80
-
<p>At the core of Pandas is the <aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v2.3.2)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">DataFrame</span></code></a> class, which is
80
+
<p>At the core of Pandas is the <aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v2.3.3)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">DataFrame</span></code></a> class, which is
81
81
a two-dimensional dataset somewhat analogous to a spreadsheet. Unlike, for
82
-
example, a <aclass="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.3)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">numpy.ndarray</span></code></a>, a <aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v2.3.2)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">DataFrame</span></code></a> is not indexed
82
+
example, a <aclass="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.3)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">numpy.ndarray</span></code></a>, a <aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v2.3.3)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">DataFrame</span></code></a> is not indexed
83
83
by a pair of numbers, but is instead organised as a collection of named
84
-
one-dimensional <aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v2.3.2)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">pandas.Series</span></code></a> of data. One can think of a
85
-
<aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v2.3.2)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">pandas.Series</span></code></a> as a column of data with a title. This perhaps best
84
+
one-dimensional <aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v2.3.3)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">pandas.Series</span></code></a> of data. One can think of a
85
+
<aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v2.3.3)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">pandas.Series</span></code></a> as a column of data with a title. This perhaps best
<p>Observe that the <aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v2.3.2)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">DataFrame</span></code></a> acts as a dictionary of
151
-
one-dimensional data <aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v2.3.2)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Series</span></code></a>. A <aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v2.3.2)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">pandas.Series</span></code></a> can be
150
+
<p>Observe that the <aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v2.3.3)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">DataFrame</span></code></a> acts as a dictionary of
151
+
one-dimensional data <aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v2.3.3)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Series</span></code></a>. A <aclass="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v2.3.3)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">pandas.Series</span></code></a> can be
152
152
indexed and sliced like any other Python <aclass="reference external" href="https://docs.python.org/3/library/stdtypes.html#typesseq" title="(in Python v3.13)"><spanclass="xref std std-ref">sequence type</span></a>. This
153
153
very high level introduction is all we’ll need to use pandas in demonstrations
154
154
in this chapter. Much more documentation is available on the <aclass="reference external" href="https://pandas.pydata.org/docs/">Pandas website</a>.</p>
0 commit comments