Member-only story
In the context of data science, you often work with various data types and structures to analyze, manipulate, and visualize data. Here’s a list of data types commonly used in data science:
1. Numeric Types:
int
: Integer (representing whole numbers)float
: Floating-point or Decimal (representing real numbers)
2. Text Type:
str
: String (representing text data)
3. Boolean Type:
bool
: Boolean (representing True or False)
4. Sequence Types:
list
: List (ordered, mutable) (used for storing ordered collections)tuple
: Tuple (ordered, immutable) (used for representing fixed collections)range
: Range of numbers (used for iterating over a sequence of numbers)
5. Set Types:
set
: Set (unordered, mutable, unique elements) (used for storing unique values)
6. Mapping Type:
dict
: Dictionary (unordered, mutable, key-value pairs) (used for storing key-value associations)
7. Text Sequence Types:
str
: String (used for text data)