File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,8 @@ def detect_language_safe(text: str) -> str:
5252 if not isinstance (text , str ) or not text .strip ():
5353 return "zz"
5454 try :
55- return langdetect .detect (text )
55+ detected : str = langdetect .detect (text )
56+ return detected
5657 except langdetect .lang_detect_exception .LangDetectException :
5758 return "zz"
5859
@@ -99,12 +100,7 @@ def clean_google_play_app_df(apps_df: pd.DataFrame) -> pd.DataFrame:
99100 can_replace_min_installs ,
100101 "installs" ,
101102 ].astype (str )
102- # apps_df["min_installs"].str.replace(r"[,+]", "", regex=True).fillna("0").astype(int)
103103 apps_df = apps_df .assign (
104- min_installs = apps_df ["min_installs" ]
105- .str .replace (r"[,+]" , "" , regex = True )
106- .fillna ("0" )
107- .astype (int ),
108104 category = apps_df ["category" ].str .lower (),
109105 release_date = pd .to_datetime (
110106 apps_df ["release_date" ], format = "%b %d, %Y"
You can’t perform that action at this time.
0 commit comments