You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Change pd.set_option('display.width', 5000) to pd.set_option('display.width', 5000) for deprecation fix
- Use requests.loc to replace requests['Incident Zip'] with value '00000' with np.nan for addressing pandas copy warnings
- Delete unique_zips.sort() because of error sorting array of strings and nan
- Add .dropna()
- Change .sort() to sort_values()
# There are a bunch of NaNs, but we're not interested in them right now, so we'll say they're True
831
829
is_far =~(is_close.fillna(True).astype(bool))
832
-
zips[is_far]
830
+
zips.loc[is_far].dropna()
833
831
```
834
832
835
833
Output:
@@ -955,7 +953,7 @@ Output:
955
953
Okay, there really are requests coming from LA and Houston! Good to know. Filtering by zip code is probably a bad way to handle this -- we should really be looking at the city instead.
0 commit comments