DFS_Portfolio_Manager / global_func /clean_player_name.py
James McCool
Initial Commit
a35b524
raw
history blame
423 Bytes
import streamlit as st
import numpy as np
import pandas as pd
import time
from fuzzywuzzy import process
def clean_player_name(name):
# Handle colon case first (remove everything before colon)
if ':' in name:
name = name.split(':')[1].strip()
# Handle parentheses case (remove everything after opening parenthesis)
if '(' in name:
name = name.split('(')[0].strip()
return name