Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Challenge: Filtering Large Datasets | Working with Large Datasets
Large Data Handling
セクション 1.  5
single

single

Challenge: Filtering Large Datasets

メニューを表示するにはスワイプしてください

Imagine you are tasked with analyzing a massive CSV file containing millions of records—too large to load into memory all at once. Your goal is to extract only those rows where a specific column's value exceeds a given threshold, saving the filtered results to a new file. This scenario is common in large-scale data analysis, where efficient, memory-friendly processing is essential.

タスク

スワイプしてコーディングを開始

Implement a function that processes a large CSV file in chunks and writes only the rows where the specified column's value is greater than the given threshold to a new file.

  • Read the input CSV file in chunks of size chunk_size.
  • For each chunk, filter rows where the column specified by column is greater than threshold.
  • Write all filtered rows to the output CSV file, including the header row.
  • If no rows match the condition, write only the header to the output file.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  5
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt