Skip to content

Commit

Permalink
fix regex warning
Browse files Browse the repository at this point in the history
  • Loading branch information
lfunderburk committed May 4, 2023
1 parent 5b91680 commit c88db26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def startup_event():

# Initialize prompter
global prompter
prompter = Prompter(openai_api_key, "gpt-3.5-turbo")
prompter = Prompter(openai_api_key, "gpt-4")

df, sample_values = init_data()

Expand Down
8 changes: 4 additions & 4 deletions src/app/app_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def data_cleaner(df):


# Replace the characters '.', '/', '(' and ')'with '_per_' all entries
df.columns = df.columns.str.replace('.', '_')
df.columns = df.columns.str.replace('/', '_per_')
df.columns = df.columns.str.replace('(', '_')
df.columns = df.columns.str.replace(')', '_')
df.columns = df.columns.str.replace('.', '_', regex=True)
df.columns = df.columns.str.replace('/', '_per_', regex=True)
df.columns = df.columns.str.replace('(', '_', regex=True)
df.columns = df.columns.str.replace(')', '_', regex=True)

# drop column hybrid_in_fuel hybrid_in_electric aggregate_levels vehicle_type_cat
df = df.drop(['hybrid_in_fuel', 'hybrid_in_electric', 'aggregate_levels','transmission_','fuel_type'], axis=1)
Expand Down

0 comments on commit c88db26

Please sign in to comment.