← Back to quizzesFree quiz

Các loại dữ liệu và định dạng trong khoa học dữ liệu

Data science relies on a solid grasp of the different data types and formats that appear in real‑world projects. This course breaks down the core concepts tested in the quiz, explains why…

10 questions~5 min
Các loại dữ liệu và định dạng trong khoa học dữ liệu — Qwi
0 / 10
Score: 0%
1

Dữ liệu nào sau đây được xem là dữ liệu định lượng liên tục?

2

Trong một bảng CSV, gì là hạn chế chính khiến dữ liệu khó xác định kiểu?

3

Một trường hợp nào sau đây là dữ liệu bán cấu trúc (semi-structured)?

4

Khi chuyển đổi dữ liệu thô thành thông tin, yếu tố nào quan trọng nhất?

5

Trong phân loại dữ liệu định tính, thuộc tính nào có thứ tự tự nhiên?

6

Đâu là ví dụ điển hình của dữ liệu không cấu trúc trong thương mại điện tử?

7

Khi làm việc với dữ liệu thời gian, thuộc tính nào sau đây là dạng dữ liệu định lượng?

8

Trong một tập dữ liệu, cột "Rating" với giá trị từ 1 đến 5 được xem là:

9

Nếu một trường dữ liệu chứa "12345" nhưng chỉ dùng làm mã định danh, cách tính nào sau đây là sai?

10

Trong quá trình chuẩn bị dữ liệu, bước nào sau đây thường thực hiện trước khi phân tích dữ liệu không cấu trúc?

Understanding Data Types and Formats in Data Science

Data science relies on a solid grasp of the different data types and formats that appear in real‑world projects. This course breaks down the core concepts tested in the quiz, explains why each type matters, and provides practical tips for handling them in Python, R, or SQL environments.

1. Quantitative Continuous Data

Continuous quantitative data can take any real value within a measurement range. Typical examples include height, weight, temperature, and time durations measured with high precision.

  • Key characteristic: No fixed step size; values can be fractional.
  • Statistical tools: Mean, standard deviation, regression analysis.
  • Visualization: Histograms, box plots, scatter plots.

In the quiz, the correct answer was Chiều cao của sinh viên (cm). Height is measured on a ruler, which can record values like 172.4 cm, illustrating the continuous nature of the data.

2. Discrete vs. Continuous Quantitative Data

Discrete quantitative data consist of countable integers—think of the number of orders per day or a rating from 1 to 5. Although the values are numeric, they cannot take fractional values.

  • Discrete example: Rating scores, number of products sold.
  • Continuous example: Transaction timestamps, sensor readings.

When a column "Rating" contains values 1‑5, it is best described as ordinal data (a type of qualitative data with natural order) rather than discrete quantitative data, because the numbers represent ordered categories rather than counts.

3. Qualitative (Categorical) Data: Nominal vs. Ordinal

Qualitative data describe attributes that are not numeric. They fall into two main groups:

  • Nominal (unordered): Gender, eye color, country of residence. These categories have no intrinsic ranking.
  • Ordinal (ordered): Satisfaction levels (dissatisfied → neutral → satisfied), education levels, Likert‑scale responses. The order matters, but the distance between categories is not defined.

The quiz highlighted that mức độ hài lòng is an ordinal attribute because respondents can be ranked from least to most satisfied.

4. Structured, Semi‑Structured, and Unstructured Data

Data can be classified by how rigidly its schema is defined:

  • Structured data: Relational tables, CSV files with fixed columns, Excel sheets. Each field has a predefined type.
  • Semi‑structured data: JSON, XML, NoSQL documents. They contain tags or keys, offering flexibility while preserving some hierarchy.
  • Unstructured data: Free‑form text, images, audio, video, and product reviews written in natural language.

In the quiz, the JSON file containing customer information and reviews was identified as semi‑structured because it carries field names (keys) but does not enforce a rigid table schema.

5. CSV Files: The Hidden Challenge of Type Inference

Comma‑Separated Values (CSV) are a ubiquitous format for data exchange. However, CSV files store everything as plain text, which means the file itself does not retain data type metadata.

  • Implication: When loading a CSV, the analyst must infer types (e.g., integer, float, date) based on the content of each column.
  • Common pitfalls: Dates interpreted as strings, leading zeros stripped from identifiers, or numeric columns mistakenly read as categorical.
  • Best practices: Use schema definitions (e.g., pandas dtype argument, R colClasses), validate with a data‑profiling tool, and document the expected types in a separate .json or .yaml schema file.

The quiz correctly pointed out that the main limitation of CSV is the lack of stored data types.

6. Turning Raw Data into Information: The Role of Context

Raw numbers become meaningful information only when they are placed in a relevant context. Context includes:

  • Metadata (units, timestamps, geographic location).
  • Business rules (e.g., a sales figure above $10,000 triggers a review).
  • Domain knowledge (understanding that a temperature of 30 °C is hot in a tropical climate but mild in a desert).

Providing context is the most critical step when converting raw data into actionable insights, as emphasized by the quiz.

7. Time‑Based Data: Quantitative vs. Qualitative

When dealing with timestamps, the data is quantitative because it can be measured on a continuous scale (seconds, milliseconds). This enables calculations such as duration, time‑between‑events, and trend analysis.

  • Quantitative example: Transaction timestamp.
  • Qualitative example: Event description or transaction type.

The quiz correctly identified the transaction timestamp as the quantitative attribute among the options.

8. Practical Tips for Managing Different Data Types

Below are actionable recommendations for data scientists working with varied data formats:

  • Validate early: Run data‑profiling scripts (e.g., pandas_profiling) to detect unexpected types.
  • Standardize units: Convert all measurements to a common unit (e.g., centimeters to meters) before analysis.
  • Leverage schema‑on‑read: Define expected types in code rather than relying on automatic inference.
  • Document context: Keep a data dictionary that records the meaning, units, and source of each column.
  • Use appropriate visualizations: Histograms for continuous data, bar charts for nominal categories, and stacked bar charts for ordinal data.

9. SEO‑Friendly Summary for Learners

When searching for resources on "data types in data science" or "semi‑structured data formats", the following keywords improve discoverability:

  • continuous quantitative data
  • discrete vs. continuous data
  • ordinal vs. nominal data
  • CSV type inference
  • semi‑structured JSON data
  • unstructured text analysis
  • data context and metadata

Incorporating these terms into article titles, headings, and meta descriptions helps search engines match your content with learners' queries.

By mastering the distinctions between continuous, discrete, nominal, ordinal, structured, semi‑structured, and unstructured data, you will be equipped to design robust data pipelines, choose the right analytical techniques, and communicate insights effectively.