3070. Fill Missing Data
My accepted Python solution to LeetCode problem 3070, Fill Missing Data, running in 256ms.
- Difficulty: Easy
- Python
- Runtime 256ms
- Memory 66.4MB
- Updated
Read the problem on LeetCode View on GitHub
The problem statement is LeetCode’s and stays on their site. What follows is my accepted solution.
Python
Accepted on LeetCode — runtime 256ms, memory 66.4MB, accepted 2026-01-02.
import pandas as pd
def fillMissingValues(products: pd.DataFrame) -> pd.DataFrame:
products['quantity'] = products['quantity'].fillna(0)
return products