0% found this document useful (0 votes)
18 views20 pages

Variable Types

The document discusses different types of data variables including categorical, numerical, discrete, continuous, and how data is stored in Pandas. Categorical variables include nominal and ordinal data which respectively have no order or have a specific order. Numerical variables can be discrete like integer counts or continuous like floating point values. Pandas can store data as integers, floats, booleans, objects, date/time, and categories. Appropriate variable types depend on the nature and meaning of the data.

Uploaded by

SURAJ KUMAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views20 pages

Variable Types

The document discusses different types of data variables including categorical, numerical, discrete, continuous, and how data is stored in Pandas. Categorical variables include nominal and ordinal data which respectively have no order or have a specific order. Numerical variables can be discrete like integer counts or continuous like floating point values. Pandas can store data as integers, floats, booleans, objects, date/time, and categories. Appropriate variable types depend on the nature and meaning of the data.

Uploaded by

SURAJ KUMAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Variables Types

Data Types
Data Types
Categorical Data

● Also known as Qualitative Data

● Represent Characteristics or Qualities

Ex. Your Gender ? Horse racing?


Data Types
Nominal Data

● Discrete

● No Specific Order

● Changing Label doesn’t impact Meaning

Ex. Your Gender ? Your religious Preference?


Ordinal Data

● Discrete

● Specific Order

● Labels represent Meaning

Horse racing? Your Grades?


Nominal vs Ordinal

● Name vs Order

● Quantitative Meaning

● Information type
Data Types
Numerical Data
● Quantitative

● Numerical significance

Ex. Your sleeping hours ? Ex. When did you sleep last night?

Do both these
questions
represent similar
values ?
Discrete Data
● Takes only certain values

● Can be counted

Ex. Your sleeping hours ?


Continuous Data
● Can take any value

● Can not be counted but measured

Ex. When did you sleep last night?


Thank You!
How Data is Stored in Pandas
Data Type: Integers and Float
● Integer and Float are kinds of numerical data
○ Integer is number without decimal point (example - 5, 902, 12)
○ Float is number with decimal point (example - 0.5, 22.7)

● Numerical operations

Example: Age of Customer (int)

Current Balance
(float)
Data Type: Boolean
● Boolean variable has only two possible values:- True/False

● Comparison
Ex. ( (7>3) & (5>6) )
False

Ex. ( (7>3) | (5>6) )


True
● Conditional Statements

Identify all such 40 years old customers


who are prone to churn?
Data Type: Object
● Object can be single or mixed type of variables
○ Text (Movie Script)
○ Mixed numeric (Passport ID)
○ Non numeric values (Currency Symbol)

Vehicle number?
Data Type: Date Time

● Date time variable for date and time values

● Timedelta variable for difference between two datetimes

Time of accident?
Data Type: Category
● Categorical variable is used to represent the categorical data.
● Can Specifying an order.

Colour of Car?
Date Time

You might also like