BuildMidData / MLAuto-graded
Fix a CSV importer that mistypes columns
An importer gets column types and nullability wrong, and crashes on an empty column. Make it follow the type rules.infer_schema(rows) is the step in a CSV importer that decides each column's type and whether it can hold nulls, so the app can build a typed table from an upload. Users report that mixed integer and decimal columns come out as integer, columns with blank cells aren't marked nullable, zero-padded codes like "01" become numbers, and a column with no values crashes the import. Rewrite it to follow the type rules in the brief, including which type wins when two could fit.30 min
python
What it measures
PythonTurning the values in every row into one type and one nullability flag per column.
Data preparation and preprocessingTreating type and nullability as properties of the whole column.
Edge casesHandling blank cells, zero-padded codes and empty columns the way the contract says.
Your environment
Terminal + editorA full shell in the browser
Coding agentAlready signed in, no API key to set up
Isolated workspaceOnly yours, wiped when you finish
Start this lab
30 min
Start labYou'll need to sign in to Anthropos first. The lab opens in a private cloud workspace with your coding agent ready to use.AI Labs is part of Anthropos Workforce. Not on your plan yet? Book a demo