Python & Data Science Cheat Sheet Vocabulary

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/149

flashcard set

Earn XP

Description and Tags

150 vocabulary flashcards covering Python basics, pandas, NumPy, scikit-learn, matplotlib, and related data science tools.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

150 Terms

1
New cards

Integer (int)

Whole number data type, e.g., 1 or -3.

2
New cards

Float (float)

Floating-point number data type, e.g., 1.2 or -0.5.

3
New cards

String (str)

Sequence of characters enclosed in quotes, like "Hello".

4
New cards

Boolean

Logical value representing True or False.

5
New cards

List

Ordered, mutable collection enclosed in square brackets [].

6
New cards

Dictionary

Unordered collection of key–value pairs in curly braces {}.

7
New cards

Variable assignment

Binding a name to a value using the = operator.

8
New cards

f-string

Formatted string literal prefixed with f that supports inline expressions.

9
New cards

Indexing

Accessing a single element of a sequence by position (e.g., lst[0]).

10
New cards

Slicing

Extracting a subsequence using start:stop syntax (e.g., lst[1:3]).

11
New cards

append()

List method that adds an item to the end of the list.

12
New cards

insert()

List method that inserts an item at a specified index.

13
New cards

remove()

List method that deletes the first matching value.

14
New cards

pop()

List method that removes and returns the item at a given index.

15
New cards

del

Statement that deletes a variable or list element by index.

16
New cards

sort()

List method that arranges elements in ascending order in place.

17
New cards

sort(reverse=True)

List sort option that arranges elements in descending order.

18
New cards

List copy slicing

Using [:] to create a shallow copy of a list.

19
New cards

list.copy()

Built-in method returning a shallow copy of the list.

20
New cards

print()

Built-in function that outputs objects to the console.

21
New cards

len()

Built-in function returning the number of items in an object.

22
New cards

min()

Built-in function returning the smallest item of an iterable.

23
New cards

max()

Built-in function returning the largest item of an iterable.

24
New cards

range()

Function that returns an immutable sequence of numbers.

25
New cards

str()

Converts an object to its string representation.

26
New cards

int()

Converts an object to an integer.

27
New cards

float()

Converts an object to a floating-point number.

28
New cards

list()

Converts an iterable into a list.

29
New cards
  • operator

Adds numbers or concatenates sequences.

30
New cards
  • operator

Subtracts one number from another.

31
New cards
  • operator

Multiplies numbers or repeats sequences.

32
New cards

/ operator

Divides numbers, returning a float result.

33
New cards

** operator

Exponentiation operator (power).

34
New cards

% operator

Modulus operator returning the remainder of division.

35
New cards

// operator

Floor division operator returning the quotient rounded down.

36
New cards

== operator

Comparison operator testing equality.

37
New cards

!= operator

Comparison operator testing inequality.

38
New cards

operator

Comparison operator testing greater than.

39
New cards
< operator

Comparison operator testing less than.

40
New cards

= operator

Comparison operator testing greater than or equal to.

41
New cards

Comparison operator testing less than or equal to.

42
New cards

string.upper()

Returns a copy of a string converted to uppercase.

43
New cards

string.lower()

Returns a copy of a string converted to lowercase.

44
New cards

string.title()

Capitalizes the first letter of each word in a string.

45
New cards

string.count()

Returns number of occurrences of a substring.

46
New cards

string.find()

Returns lowest index of a substring or -1 if not found.

47
New cards

string.replace()

Returns a copy of the string with occurrences replaced.

48
New cards

if statement

Executes a code block when its condition evaluates to True.

49
New cards

elif

Additional conditional branch following an if statement.

50
New cards

else

Branch executed when preceding conditions are False.

51
New cards

in operator

Checks membership of a value within a container.

52
New cards

for loop

Iterates over items in a sequence or iterable.

53
New cards

enumerate()

Returns pairs of index and item during iteration.

54
New cards

dict.items()

Dictionary method returning key–value pairs view.

55
New cards

while loop

Repeats a block as long as a condition stays True.

56
New cards

try-except

Error handling construct catching exceptions.

57
New cards

break

Loop control statement that exits the loop immediately.

58
New cards

continue

Loop control statement that skips to the next iteration.

59
New cards

pass

Null operation placeholder that performs no action.

60
New cards

def

Python keyword used to define a function.

61
New cards

return

Exits a function, optionally passing back a value.

62
New cards

import statement

Loads a module or object into the current namespace.

63
New cards

os.getcwd()

Returns the current working directory path.

64
New cards

os.listdir()

Lists files and directories for a given path.

65
New cards

os.makedirs()

Recursively creates directory/ies at the specified path.

66
New cards

dict.keys()

Returns a view object of dictionary keys.

67
New cards

dict.values()

Returns a view object of dictionary values.

68
New cards

dict.items() (dictionary)

Returns a view object of dictionary key–value tuples.

69
New cards

dict.update()

Adds or overwrites multiple key–value pairs.

70
New cards

dict.pop()

Removes and returns a value for the specified key.

71
New cards

dict.clear()

Removes all items from a dictionary.

72
New cards

dict.copy()

Returns a shallow copy of the dictionary.

73
New cards

and operator

Logical conjunction; True only if both operands are True.

74
New cards

or operator

Logical disjunction; True if at least one operand is True.

75
New cards

not operator

Logical negation that inverts a Boolean value.

76
New cards

Bitwise &

Binary AND on integers or element-wise logical AND on arrays.

77
New cards

Bitwise |

Binary OR on integers or element-wise logical OR on arrays.

78
New cards

Bitwise ~

Binary NOT that inverts bits or Booleans.

79
New cards

Pandas

Python library for high-level data manipulation and analysis.

80
New cards

Series

One-dimensional labeled array in pandas.

81
New cards

DataFrame

Two-dimensional labeled data table in pandas.

82
New cards

pd.read_csv()

Reads a CSV file into a pandas DataFrame.

83
New cards

df.head()

Returns the first n rows of a DataFrame.

84
New cards

df.tail()

Returns the last n rows of a DataFrame.

85
New cards

df.loc[]

Label-based selector for rows and columns.

86
New cards

df.T

Transposes rows and columns of the DataFrame.

87
New cards

df.drop()

Removes specified rows or columns from the DataFrame.

88
New cards

pd.concat()

Concatenates pandas objects along a particular axis.

89
New cards

df.merge()

Performs database-style join operations between DataFrames.

90
New cards

df.fillna()

Replaces missing (NaN) values with a specified value.

91
New cards

df.apply()

Applies a function along an axis of the DataFrame.

92
New cards

df.sum()

Computes sum of values over requested axis.

93
New cards

df.mean()

Computes mean of values over requested axis.

94
New cards

df.std()

Computes standard deviation over requested axis.

95
New cards

df.describe()

Generates descriptive statistics summary of DataFrame.

96
New cards

df.groupby()

Splits data into groups for aggregation or transformation.

97
New cards

df.plot(kind='box')

Creates a boxplot from DataFrame or Series data.

98
New cards

df.plot(kind='hist')

Creates a histogram from DataFrame or Series data.

99
New cards

df.plot(kind='pie')

Creates a pie chart from DataFrame or Series data.

100
New cards

plt.xticks()

Sets locations and labels of x-axis tick marks.