8: Arrays in Python (1 of 2)

The Crystal Ball - Instruction Manual I: Introduction to Data Science · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-SA 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    8: Arrays in Python (1 of 2)

    There are several candidates in the Python language for representing the type of array structure we introduced in chapter 7. One is the plain-ol’ Python list, which you may have used if you’ve taken a computer science course in Python. Turns out, lists are going to be too slow for us once we start dealing with a lot of data, plus there are a lot of things that it won’t do for us automatically that are handy to have. Another choice is the Pandas Series which we’ll actually introduce in chapter 11 – oddly, that one turns out to do too much, rather than too little, for our purposes here. A happy medium is the ndarray from the NumPy package1 . Before we do that, however, we need to learn what a “package” actually is, and how to use one.

    1Most people seem to pronounce this “NUM-pie,” although I’ve heard “NUM-pee” as well. Pick your poison.


    This page titled 8: Arrays in Python (1 of 2) was last modified on Sun, 18 Sep 2022 02:06:03 GMT and is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Stephen Davies (allthemath.org) via source content that was edited to the style and standards of the LibreTexts platform.