[Solved] Python: Maping multiple strings in a dataframe but only 1 works?

Mizanur Choudhury Asks: Python: Maping multiple strings in a dataframe but only 1 works?
So Im trying to map this gas data together but the CSV out put from my dataframe is only outputting one mapping at a time. Sometimes it hwl, others its lpg? Whats going on?

Code:
def fln():
    df["New Meter Model"] = df["New Serial Number"].str[-4:].map({"2000": "G4SZV-2", "2100": "G4SZV-2", "1800": "G4SZV-1", "1900": "G4SZV-1"})
    df["New Meter Manufacturer"] = df["New Serial Number"].str[-4:].map({"2000": "FLN", "2100": "FLN", "1800": "FLN", "1900": "FLN"})


def lpg():
    df["New Meter Model"] = df["New Serial Number"].str[-4:].map({"2061": "G470"})
    df["New Meter Manufacturer"] = df["New Serial Number"].str[-4:].map({"2061": "LPG"})


def hwl():
    df["New Meter Model"] = df["New Serial Number"].str[-4:].map({"1914": "BK-G4E"})
    df["New Meter Manufacturer"] = df["New Serial Number"].str[-4:].map({"1914": "HWL"})
    logging.info('Updated meter manufacturer codes and meter models')

This is how it is being output


enter image description here

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.