<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
I have a pandas Dataframe like below:
<ASSISTANT_TASK:>
Python Code:
import pandas as pd
df = pd.DataFrame({'UserId': [1, 1, 1, 2, 3, 3],
                   'ProductId': [1, 4, 7, 4, 2, 1],
                   'Quantity': [6, 1, 3, 2, 7, 2]})
def g(df):
    l = int(0.2 * len(df))
    dfupdate = df.sample(l, random_state=0)
    dfupdate.Quantity = 0
    df.update(dfupdate)
    return df
df = g(df.copy())
<END_TASK>