1/149
150 vocabulary flashcards covering Python basics, pandas, NumPy, scikit-learn, matplotlib, and related data science tools.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Integer (int)
Whole number data type, e.g., 1 or -3.
Float (float)
Floating-point number data type, e.g., 1.2 or -0.5.
String (str)
Sequence of characters enclosed in quotes, like "Hello".
Boolean
Logical value representing True or False.
List
Ordered, mutable collection enclosed in square brackets [].
Dictionary
Unordered collection of key–value pairs in curly braces {}.
Variable assignment
Binding a name to a value using the = operator.
f-string
Formatted string literal prefixed with f that supports inline expressions.
Indexing
Accessing a single element of a sequence by position (e.g., lst[0]).
Slicing
Extracting a subsequence using start:stop syntax (e.g., lst[1:3]).
append()
List method that adds an item to the end of the list.
insert()
List method that inserts an item at a specified index.
remove()
List method that deletes the first matching value.
pop()
List method that removes and returns the item at a given index.
del
Statement that deletes a variable or list element by index.
sort()
List method that arranges elements in ascending order in place.
sort(reverse=True)
List sort option that arranges elements in descending order.
List copy slicing
Using [:] to create a shallow copy of a list.
list.copy()
Built-in method returning a shallow copy of the list.
print()
Built-in function that outputs objects to the console.
len()
Built-in function returning the number of items in an object.
min()
Built-in function returning the smallest item of an iterable.
max()
Built-in function returning the largest item of an iterable.
range()
Function that returns an immutable sequence of numbers.
str()
Converts an object to its string representation.
int()
Converts an object to an integer.
float()
Converts an object to a floating-point number.
list()
Converts an iterable into a list.
Adds numbers or concatenates sequences.
Subtracts one number from another.
Multiplies numbers or repeats sequences.
/ operator
Divides numbers, returning a float result.
** operator
Exponentiation operator (power).
% operator
Modulus operator returning the remainder of division.
// operator
Floor division operator returning the quotient rounded down.
== operator
Comparison operator testing equality.
!= operator
Comparison operator testing inequality.
operator
Comparison operator testing greater than.
Comparison operator testing less than.
= operator
Comparison operator testing greater than or equal to.
Comparison operator testing less than or equal to.
string.upper()
Returns a copy of a string converted to uppercase.
string.lower()
Returns a copy of a string converted to lowercase.
string.title()
Capitalizes the first letter of each word in a string.
string.count()
Returns number of occurrences of a substring.
string.find()
Returns lowest index of a substring or -1 if not found.
string.replace()
Returns a copy of the string with occurrences replaced.
if statement
Executes a code block when its condition evaluates to True.
elif
Additional conditional branch following an if statement.
else
Branch executed when preceding conditions are False.
in operator
Checks membership of a value within a container.
for loop
Iterates over items in a sequence or iterable.
enumerate()
Returns pairs of index and item during iteration.
dict.items()
Dictionary method returning key–value pairs view.
while loop
Repeats a block as long as a condition stays True.
try-except
Error handling construct catching exceptions.
break
Loop control statement that exits the loop immediately.
continue
Loop control statement that skips to the next iteration.
pass
Null operation placeholder that performs no action.
def
Python keyword used to define a function.
return
Exits a function, optionally passing back a value.
import statement
Loads a module or object into the current namespace.
os.getcwd()
Returns the current working directory path.
os.listdir()
Lists files and directories for a given path.
os.makedirs()
Recursively creates directory/ies at the specified path.
dict.keys()
Returns a view object of dictionary keys.
dict.values()
Returns a view object of dictionary values.
dict.items() (dictionary)
Returns a view object of dictionary key–value tuples.
dict.update()
Adds or overwrites multiple key–value pairs.
dict.pop()
Removes and returns a value for the specified key.
dict.clear()
Removes all items from a dictionary.
dict.copy()
Returns a shallow copy of the dictionary.
and operator
Logical conjunction; True only if both operands are True.
or operator
Logical disjunction; True if at least one operand is True.
not operator
Logical negation that inverts a Boolean value.
Bitwise &
Binary AND on integers or element-wise logical AND on arrays.
Bitwise |
Binary OR on integers or element-wise logical OR on arrays.
Bitwise ~
Binary NOT that inverts bits or Booleans.
Pandas
Python library for high-level data manipulation and analysis.
Series
One-dimensional labeled array in pandas.
DataFrame
Two-dimensional labeled data table in pandas.
pd.read_csv()
Reads a CSV file into a pandas DataFrame.
df.head()
Returns the first n rows of a DataFrame.
df.tail()
Returns the last n rows of a DataFrame.
df.loc[]
Label-based selector for rows and columns.
df.T
Transposes rows and columns of the DataFrame.
df.drop()
Removes specified rows or columns from the DataFrame.
pd.concat()
Concatenates pandas objects along a particular axis.
df.merge()
Performs database-style join operations between DataFrames.
df.fillna()
Replaces missing (NaN) values with a specified value.
df.apply()
Applies a function along an axis of the DataFrame.
df.sum()
Computes sum of values over requested axis.
df.mean()
Computes mean of values over requested axis.
df.std()
Computes standard deviation over requested axis.
df.describe()
Generates descriptive statistics summary of DataFrame.
df.groupby()
Splits data into groups for aggregation or transformation.
df.plot(kind='box')
Creates a boxplot from DataFrame or Series data.
df.plot(kind='hist')
Creates a histogram from DataFrame or Series data.
df.plot(kind='pie')
Creates a pie chart from DataFrame or Series data.
plt.xticks()
Sets locations and labels of x-axis tick marks.