PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches

Quick Overview

This question evaluates competency in data preprocessing and validation for machine learning—enforcing correct data types, encoding categorical variables, detecting missing values, and assessing class balance.

  • Medium
  • Reddit
  • Data Manipulation (SQL/Python)
  • Machine Learning Engineer

Load and prepare JSON for modeling

Company: Reddit

Role: Machine Learning Engineer

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

Using Python in a Jupyter notebook, load a JSON dataset with fields: ( 1) hours spent reading A posts (float), ( 2) hours spent reading B posts (float), ( 3) hours spent reading C posts (float), ( 4) current post category (A/B/C), and ( 5) click (binary label). Convert it into a pandas DataFrame suitable for modeling: enforce correct data types, encode the categorical post category, validate the schema, and run checks confirming no missing values or class imbalance. Provide code that performs the load, transformation, and validation.

Quick Answer: This question evaluates competency in data preprocessing and validation for machine learning—enforcing correct data types, encoding categorical variables, detecting missing values, and assessing class balance.

Last updated: Mar 29, 2026

Related Coding Questions

  • Query US-based users and most active forums - Reddit (Medium)

Loading coding console...

PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.