DataDriven
LearnPracticeInterviewDiscussDailyJobs

Stream-Process a Large CSV

A hard Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
hard
Seniority
L5

Problem

Given an iterable of CSV lines (each line a string, no trailing newline) and a column name, stream the iterable lazily and return the sum of numeric values in that column. The first line is the header. Skip rows whose target-column value is missing or not numeric. Return a float. Process row-by-row without materializing the whole iterable in memory.

Summary

Too big to load. Read what you can.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.

Related

  • All Practice Problems
  • Mock Interview Mode
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons