File size: 264 Bytes
d95db82 |
1 2 3 4 5 6 7 8 9 10 11 |
import pandas as pd
if __name__ == "__main__":
raw_data = "raw/mpg.csv"
df = pd.read_csv(raw_data, na_values="?")
origin_map = {1: "usa", 2: "europe", 3: "japan"}
df["origin"] = df["origin"].map(origin_map)
df.to_csv("mpg.csv", index=False)
|