1/23
Flashcards to help beginners and intermediate users learn Python for data science.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Python
A popular programming language in data science known for its ease of learning and powerful libraries for data analysis.
Packages
Collections of useful tools developed by the open-source community that extend the capabilities of the Python language.
pip install pandas
Command prompt command to install a new Python package (example: pandas).
Working Directory
The default file path that Python reads or saves files into.
os library
Needed to set and get the working directory in Python.
Arithmetic Operators
Assignment Operators
Used to assign values to variables (e.g., a = 5) or change the value of an item in a list (e.g., x[0] = 1).
Numeric Comparison Operators
== (equal to), != (not equal to), > (greater than), >= (greater than or equal to), < (less than), <= (less than or equal to).
Logical Operators
not (logical NOT), and (logical AND), or (logical OR).
List
An ordered and changeable sequence of elements that can hold integers, characters, floats, strings, and objects.
Zero-indexed
Python lists are zero-indexed, meaning the first element has index 0.
Dictionary
Stores data values in key-value pairs, indexed by unique keys (names).
NumPy
A Python package for scientific computing that provides multidimensional array objects and efficient operations on them.
np.array([1, 2, 3])
Convert a python list to a NumPy array
String
A sequence of characters, created with double or single quotes.
str[0]
Get the character at a specific position
Concatenate strings (+)
Combines strings together
Pandas
A fast and powerful package for data analysis and manipulation in Python.
DataFrame
A Pandas structure that contains two-dimensional data stored as rows and columns.
Series
A Pandas structure that contains one-dimensional data.
pd.concat([df, df])
Concatenate DataFrames vertically
str.upper()
Convert a string to uppercase
str.lower()
Convert a string to lowercase
df.mean()
Calculate the mean of each column