mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 21:42:22 +00:00
10 lines
266 B
Python
10 lines
266 B
Python
import pandas as pd
|
|
|
|
|
|
def clean_df_index(df: pd.DataFrame):
|
|
df.index = [
|
|
"".join(" " + char if char.isupper() else char.strip() for char in idx).strip()
|
|
for idx in df.index.tolist()
|
|
]
|
|
df.index = [s_val.capitalize() for s_val in df.index]
|