DFS_Portfolio_Manager / global_func /clean_player_name.py
James McCool
Remove redundant Streamlit page config from global functions
366e406
raw
history blame contribute delete
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