NumPy is the library that gives Python its ability to work with data at speed. Originally, launched in 1995 as ‘Numeric,’ NumPy is the foundation on which many important Python data science libraries are built, including Pandas, SciPy and scikit-learn. It’s common when first learning NumPy to have trouble remembering all the functions and methods that you need, and while at Dataquest we advocate getting used to consulting the NumPy documentation, sometimes it’s nice to have a handy reference, so we’ve put together this cheat sheet to help you out! If you’re interested in learning NumPy, you can consult our NumPy tutorial blog post, or you can signup for free and start learning NumPy through our interactive Python data science course. Download a Printable PDF of this Cheat Sheet Show Key and ImportsIn this cheat sheet, we use the following shorthand:
Importing/exporting Creating Arrays Inspecting Properties Copying/sorting/reshaping Adding/removing Elements Combining/splitting Indexing/slicing/subsetting Scalar Math Vector Math Statistics Download a printable version of this cheat sheetIf you’d like to download a printable version of this cheat sheet you can do so below. Download a Printable PDF of this Cheat Sheet |