Created
February 8, 2020 17:29
-
-
Save CharlyWargnier/5040f287406af2370d2c598f4d310fc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| df['httpCodeClass'] = pd.np.where(df.httpCode.str.contains("^1.*"), 'Info (1XX)', | |
| pd.np.where(df.httpCode.str.contains("^2.*"), 'Success (2XX)', | |
| pd.np.where(df.httpCode.str.contains("^3.*"), 'Redirects (3XX)', | |
| pd.np.where(df.httpCode.str.contains("^4.*"), 'Client errors (4XX)', 'Server errors (5XX)')))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment