liveBook · Manning

Dataset

As explained in Data Without Labels

A collection of related data instances or observations organized for analysis or computation.

A dataset is the collection of data assembled for a particular analysis. It may contain numbers, text, or mixed data types; it may be clean or unclean, ordered or unordered. Its value comes from preparing and analyzing it to find patterns and produce actionable insights. section 1.2.1 section 1.0

Start with the business question, then choose data and attributes that describe it. An apparel retailer might combine revenue and invoice data in a master table and derive average transaction value as total revenue divided by the number of invoices. A telecom operator would instead need attributes such as subscriber usage, call rate, revenue, time on the network, and data usage. The dataset changes with the domain. section 2.6.2

Before modeling, check whether the dataset can support the intended decision:

  • Confirm that the required data is accessible to the people and systems that need it, whether it resides in a database, server, cloud service, or file. section 11.3
  • Check completeness, relevance, and coverage of business variability. Include enough history to capture effects such as seasonality when they matter. section 11.3
  • Look for missing values and outliers, verify business rules, and plan how the data will be refreshed after deployment. section 11.3

Customer reviews as a dataset

For sentiment analysis, collect reviews from sources such as websites or surveys. Store review attributes—including rating, title, date, and body—in a pandas DataFrame, then save and reload the data as a CSV file. Inspect its shape and rating distribution before cleaning the review text and computing sentiment. Comparing star ratings with sentiment results helps put the outputs in context. section 7.15

# Create a dataframe here. 

reviews_df = pd.DataFrame()
for review in reviews:
    rating  = review.xpath(xpath_rating)
    title   = review.xpath(xpath_title)
    author  = review.xpath(xpath_author)
    date    = review.xpath(xpath_date)
    body    = review.xpath(xpath_body)
    helpful = review.xpath(xpath_helpful)

    review_dict = {'rating': rating,
                   'title': title,
                   'author': author,             
                   'date': date,
                   'body': body,
                   'helpful': helpful}
    reviews_df = reviews_df.append(review_dict, ignore_index=True)
all_reviews = pd.DataFrame()

The Python listing shows how extracted review fields become rows in a pandas DataFrame. section 7.15

How Data Without Labels covers it

How deep it goes
Explains dataset selection, derived attributes, quality checks, and a worked review-data workflow; does not specify a universal dataset schema.
Examples
Uses retail and telecom attributes, plus collected customer reviews stored in a DataFrame and inspected through rating counts.
What it assumes
Introduces data and dataset conditions in accessible terms while using SQL and Python tools for practical workflows.
What you can do after
Practice/perform dataset selection, access checks, attribute derivation, initial inspection, and refresh planning for a business analysis.
How it connects
Connects datasets to data cleaning, feature derivation, clustering, sentiment analysis, and model deployment.

Also explained in

Compare how 24 books explain dataset →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Without Labels. The section links point to the parts of the book it draws on.