LeetCode solutions

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

Read the problem on LeetCode View on GitHub

Python

Accepted on LeetCode — runtime 256ms, memory 66.4MB, accepted 2026-01-02.

python
import pandas as pd

def fillMissingValues(products: pd.DataFrame) -> pd.DataFrame:
    products['quantity'] = products['quantity'].fillna(0)
    return products

Source