Pandas Replace certain values in each column












0















I have a dataframe which looks as below



+---+-------------+---------+---------------+---------------+---------+------+--------------------------+-----+----------+
| | Pregnancies | Glucose | BloodPressure | SkinThickness | Insulin | BMI | DiabetesPedigreeFunction | Age | Outcome |
+---+-------------+---------+---------------+---------------+---------+------+--------------------------+-----+----------+
| 0 | 6 | 148.0 | 72.0 | 35.0 | 125.0 | 33.6 | 0.627 | 50 | 1 |
| 1 | 1 | 85.0 | 66.0 | 29.0 | 125.0 | 26.6 | 0.351 | 31 | 0 |
| 2 | 8 | 183.0 | 64.0 | 29.0 | 125.0 | 23.3 | 0.672 | 32 | 1 |
| 3 | 1 | 89.0 | 66.0 | 23.0 | 94.0 | 28.1 | 0.167 | 21 | 0 |
| 4 | 0 | 137.0 | 40.0 | 35.0 | 168.0 | 43.1 | 2.288 | 33 | 1 |
+---+-------------+---------+---------------+---------------+---------+------+--------------------------+-----+----------+


After watching the box plot for each variable.I found that they have outliers in them.



So in each column except Outcome I want to replace the values which are greater than 95 percentile with value at 75 percentile and values which are less than 5 percentile with 25 percentile of that particular column



For example in column Glucose values which are above 95 percentile I want to replace them with value at 75 percentile of Glucose column



How can I do this with pandas filter and percentile function



Any help for this will be appreciated










share|improve this question



























    0















    I have a dataframe which looks as below



    +---+-------------+---------+---------------+---------------+---------+------+--------------------------+-----+----------+
    | | Pregnancies | Glucose | BloodPressure | SkinThickness | Insulin | BMI | DiabetesPedigreeFunction | Age | Outcome |
    +---+-------------+---------+---------------+---------------+---------+------+--------------------------+-----+----------+
    | 0 | 6 | 148.0 | 72.0 | 35.0 | 125.0 | 33.6 | 0.627 | 50 | 1 |
    | 1 | 1 | 85.0 | 66.0 | 29.0 | 125.0 | 26.6 | 0.351 | 31 | 0 |
    | 2 | 8 | 183.0 | 64.0 | 29.0 | 125.0 | 23.3 | 0.672 | 32 | 1 |
    | 3 | 1 | 89.0 | 66.0 | 23.0 | 94.0 | 28.1 | 0.167 | 21 | 0 |
    | 4 | 0 | 137.0 | 40.0 | 35.0 | 168.0 | 43.1 | 2.288 | 33 | 1 |
    +---+-------------+---------+---------------+---------------+---------+------+--------------------------+-----+----------+


    After watching the box plot for each variable.I found that they have outliers in them.



    So in each column except Outcome I want to replace the values which are greater than 95 percentile with value at 75 percentile and values which are less than 5 percentile with 25 percentile of that particular column



    For example in column Glucose values which are above 95 percentile I want to replace them with value at 75 percentile of Glucose column



    How can I do this with pandas filter and percentile function



    Any help for this will be appreciated










    share|improve this question

























      0












      0








      0








      I have a dataframe which looks as below



      +---+-------------+---------+---------------+---------------+---------+------+--------------------------+-----+----------+
      | | Pregnancies | Glucose | BloodPressure | SkinThickness | Insulin | BMI | DiabetesPedigreeFunction | Age | Outcome |
      +---+-------------+---------+---------------+---------------+---------+------+--------------------------+-----+----------+
      | 0 | 6 | 148.0 | 72.0 | 35.0 | 125.0 | 33.6 | 0.627 | 50 | 1 |
      | 1 | 1 | 85.0 | 66.0 | 29.0 | 125.0 | 26.6 | 0.351 | 31 | 0 |
      | 2 | 8 | 183.0 | 64.0 | 29.0 | 125.0 | 23.3 | 0.672 | 32 | 1 |
      | 3 | 1 | 89.0 | 66.0 | 23.0 | 94.0 | 28.1 | 0.167 | 21 | 0 |
      | 4 | 0 | 137.0 | 40.0 | 35.0 | 168.0 | 43.1 | 2.288 | 33 | 1 |
      +---+-------------+---------+---------------+---------------+---------+------+--------------------------+-----+----------+


      After watching the box plot for each variable.I found that they have outliers in them.



      So in each column except Outcome I want to replace the values which are greater than 95 percentile with value at 75 percentile and values which are less than 5 percentile with 25 percentile of that particular column



      For example in column Glucose values which are above 95 percentile I want to replace them with value at 75 percentile of Glucose column



      How can I do this with pandas filter and percentile function



      Any help for this will be appreciated










      share|improve this question














      I have a dataframe which looks as below



      +---+-------------+---------+---------------+---------------+---------+------+--------------------------+-----+----------+
      | | Pregnancies | Glucose | BloodPressure | SkinThickness | Insulin | BMI | DiabetesPedigreeFunction | Age | Outcome |
      +---+-------------+---------+---------------+---------------+---------+------+--------------------------+-----+----------+
      | 0 | 6 | 148.0 | 72.0 | 35.0 | 125.0 | 33.6 | 0.627 | 50 | 1 |
      | 1 | 1 | 85.0 | 66.0 | 29.0 | 125.0 | 26.6 | 0.351 | 31 | 0 |
      | 2 | 8 | 183.0 | 64.0 | 29.0 | 125.0 | 23.3 | 0.672 | 32 | 1 |
      | 3 | 1 | 89.0 | 66.0 | 23.0 | 94.0 | 28.1 | 0.167 | 21 | 0 |
      | 4 | 0 | 137.0 | 40.0 | 35.0 | 168.0 | 43.1 | 2.288 | 33 | 1 |
      +---+-------------+---------+---------------+---------------+---------+------+--------------------------+-----+----------+


      After watching the box plot for each variable.I found that they have outliers in them.



      So in each column except Outcome I want to replace the values which are greater than 95 percentile with value at 75 percentile and values which are less than 5 percentile with 25 percentile of that particular column



      For example in column Glucose values which are above 95 percentile I want to replace them with value at 75 percentile of Glucose column



      How can I do this with pandas filter and percentile function



      Any help for this will be appreciated







      python pandas percentile






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 13 '18 at 17:34









      Rookie_123Rookie_123

      410212




      410212
























          1 Answer
          1






          active

          oldest

          votes


















          3














          You can use apply on all columns except outcome, with the functions np.clip and np.percentile:



          import numpy as np

          percentile_df = df.set_index('Outcome').apply(lambda x: np.clip(x, *np.percentile(x, [25,75]))).reset_index()

          >>> percentile_df
          Outcome Pregnancies Glucose BloodPressure SkinThickness Insulin BMI
          0 1 6.0 148.0 66.0 35.0 125.0 33.6
          1 0 1.0 89.0 66.0 29.0 125.0 26.6
          2 1 6.0 148.0 64.0 29.0 125.0 26.6
          3 0 1.0 89.0 66.0 29.0 125.0 28.1
          4 1 1.0 137.0 64.0 35.0 125.0 33.6

          DiabetesPedigreeFunction Age
          0 0.627 33.0
          1 0.351 31.0
          2 0.672 32.0
          3 0.351 31.0
          4 0.672 33.0


          [EDIT] I misread the question at first, here is a way to change the 5th and 95th percentile to 25th and 75th respectively, using np.select:



          def cut(column):
          conds = [column > np.percentile(column, 95),
          column < np.percentile(column, 5)]
          choices = [np.percentile(column, 75),
          np.percentile(column, 25)]
          return np.select(conds,choices,column)

          df.set_index('Outcome',inplace=True)

          df = df.apply(lambda x: cut(x)).reset_index()

          >>> df
          Outcome Pregnancies Glucose BloodPressure SkinThickness Insulin BMI
          0 1 6.0 148.0 66.0 35.0 125.0 33.6
          1 0 1.0 89.0 66.0 29.0 125.0 26.6
          2 1 6.0 148.0 64.0 29.0 125.0 26.6
          3 0 1.0 89.0 66.0 29.0 125.0 28.1
          4 1 1.0 137.0 64.0 35.0 125.0 33.6

          DiabetesPedigreeFunction Age
          0 0.627 33.0
          1 0.351 31.0
          2 0.672 32.0
          3 0.351 31.0
          4 0.672 33.0





          share|improve this answer





















          • 1





            I've never thought about it... why not? the documentation for pd.np.clip should just be the docs for np.clip. In any case, then I'll just delete the pd.

            – sacul
            Nov 13 '18 at 17:45








          • 1





            Never tried it myself, that's all. Also you can do np.percentile(x, [25, 75]). That version would get my vote :).

            – jpp
            Nov 13 '18 at 17:46








          • 1





            Thanks! Yeah, that's better!

            – sacul
            Nov 13 '18 at 17:48











          • What does *np.percentile does.I read about np.percentile but why * is used

            – Rookie_123
            Nov 13 '18 at 17:54











          • np.percentile(x, [25, 75]) returns values for the 25th and the 75th percentile, so you need to unpack that using * so that the 25th percentile gets passed to a_min and the 75th percentile gets passed to a_max of np.clip

            – sacul
            Nov 13 '18 at 19:33











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53286615%2fpandas-replace-certain-values-in-each-column%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          You can use apply on all columns except outcome, with the functions np.clip and np.percentile:



          import numpy as np

          percentile_df = df.set_index('Outcome').apply(lambda x: np.clip(x, *np.percentile(x, [25,75]))).reset_index()

          >>> percentile_df
          Outcome Pregnancies Glucose BloodPressure SkinThickness Insulin BMI
          0 1 6.0 148.0 66.0 35.0 125.0 33.6
          1 0 1.0 89.0 66.0 29.0 125.0 26.6
          2 1 6.0 148.0 64.0 29.0 125.0 26.6
          3 0 1.0 89.0 66.0 29.0 125.0 28.1
          4 1 1.0 137.0 64.0 35.0 125.0 33.6

          DiabetesPedigreeFunction Age
          0 0.627 33.0
          1 0.351 31.0
          2 0.672 32.0
          3 0.351 31.0
          4 0.672 33.0


          [EDIT] I misread the question at first, here is a way to change the 5th and 95th percentile to 25th and 75th respectively, using np.select:



          def cut(column):
          conds = [column > np.percentile(column, 95),
          column < np.percentile(column, 5)]
          choices = [np.percentile(column, 75),
          np.percentile(column, 25)]
          return np.select(conds,choices,column)

          df.set_index('Outcome',inplace=True)

          df = df.apply(lambda x: cut(x)).reset_index()

          >>> df
          Outcome Pregnancies Glucose BloodPressure SkinThickness Insulin BMI
          0 1 6.0 148.0 66.0 35.0 125.0 33.6
          1 0 1.0 89.0 66.0 29.0 125.0 26.6
          2 1 6.0 148.0 64.0 29.0 125.0 26.6
          3 0 1.0 89.0 66.0 29.0 125.0 28.1
          4 1 1.0 137.0 64.0 35.0 125.0 33.6

          DiabetesPedigreeFunction Age
          0 0.627 33.0
          1 0.351 31.0
          2 0.672 32.0
          3 0.351 31.0
          4 0.672 33.0





          share|improve this answer





















          • 1





            I've never thought about it... why not? the documentation for pd.np.clip should just be the docs for np.clip. In any case, then I'll just delete the pd.

            – sacul
            Nov 13 '18 at 17:45








          • 1





            Never tried it myself, that's all. Also you can do np.percentile(x, [25, 75]). That version would get my vote :).

            – jpp
            Nov 13 '18 at 17:46








          • 1





            Thanks! Yeah, that's better!

            – sacul
            Nov 13 '18 at 17:48











          • What does *np.percentile does.I read about np.percentile but why * is used

            – Rookie_123
            Nov 13 '18 at 17:54











          • np.percentile(x, [25, 75]) returns values for the 25th and the 75th percentile, so you need to unpack that using * so that the 25th percentile gets passed to a_min and the 75th percentile gets passed to a_max of np.clip

            – sacul
            Nov 13 '18 at 19:33
















          3














          You can use apply on all columns except outcome, with the functions np.clip and np.percentile:



          import numpy as np

          percentile_df = df.set_index('Outcome').apply(lambda x: np.clip(x, *np.percentile(x, [25,75]))).reset_index()

          >>> percentile_df
          Outcome Pregnancies Glucose BloodPressure SkinThickness Insulin BMI
          0 1 6.0 148.0 66.0 35.0 125.0 33.6
          1 0 1.0 89.0 66.0 29.0 125.0 26.6
          2 1 6.0 148.0 64.0 29.0 125.0 26.6
          3 0 1.0 89.0 66.0 29.0 125.0 28.1
          4 1 1.0 137.0 64.0 35.0 125.0 33.6

          DiabetesPedigreeFunction Age
          0 0.627 33.0
          1 0.351 31.0
          2 0.672 32.0
          3 0.351 31.0
          4 0.672 33.0


          [EDIT] I misread the question at first, here is a way to change the 5th and 95th percentile to 25th and 75th respectively, using np.select:



          def cut(column):
          conds = [column > np.percentile(column, 95),
          column < np.percentile(column, 5)]
          choices = [np.percentile(column, 75),
          np.percentile(column, 25)]
          return np.select(conds,choices,column)

          df.set_index('Outcome',inplace=True)

          df = df.apply(lambda x: cut(x)).reset_index()

          >>> df
          Outcome Pregnancies Glucose BloodPressure SkinThickness Insulin BMI
          0 1 6.0 148.0 66.0 35.0 125.0 33.6
          1 0 1.0 89.0 66.0 29.0 125.0 26.6
          2 1 6.0 148.0 64.0 29.0 125.0 26.6
          3 0 1.0 89.0 66.0 29.0 125.0 28.1
          4 1 1.0 137.0 64.0 35.0 125.0 33.6

          DiabetesPedigreeFunction Age
          0 0.627 33.0
          1 0.351 31.0
          2 0.672 32.0
          3 0.351 31.0
          4 0.672 33.0





          share|improve this answer





















          • 1





            I've never thought about it... why not? the documentation for pd.np.clip should just be the docs for np.clip. In any case, then I'll just delete the pd.

            – sacul
            Nov 13 '18 at 17:45








          • 1





            Never tried it myself, that's all. Also you can do np.percentile(x, [25, 75]). That version would get my vote :).

            – jpp
            Nov 13 '18 at 17:46








          • 1





            Thanks! Yeah, that's better!

            – sacul
            Nov 13 '18 at 17:48











          • What does *np.percentile does.I read about np.percentile but why * is used

            – Rookie_123
            Nov 13 '18 at 17:54











          • np.percentile(x, [25, 75]) returns values for the 25th and the 75th percentile, so you need to unpack that using * so that the 25th percentile gets passed to a_min and the 75th percentile gets passed to a_max of np.clip

            – sacul
            Nov 13 '18 at 19:33














          3












          3








          3







          You can use apply on all columns except outcome, with the functions np.clip and np.percentile:



          import numpy as np

          percentile_df = df.set_index('Outcome').apply(lambda x: np.clip(x, *np.percentile(x, [25,75]))).reset_index()

          >>> percentile_df
          Outcome Pregnancies Glucose BloodPressure SkinThickness Insulin BMI
          0 1 6.0 148.0 66.0 35.0 125.0 33.6
          1 0 1.0 89.0 66.0 29.0 125.0 26.6
          2 1 6.0 148.0 64.0 29.0 125.0 26.6
          3 0 1.0 89.0 66.0 29.0 125.0 28.1
          4 1 1.0 137.0 64.0 35.0 125.0 33.6

          DiabetesPedigreeFunction Age
          0 0.627 33.0
          1 0.351 31.0
          2 0.672 32.0
          3 0.351 31.0
          4 0.672 33.0


          [EDIT] I misread the question at first, here is a way to change the 5th and 95th percentile to 25th and 75th respectively, using np.select:



          def cut(column):
          conds = [column > np.percentile(column, 95),
          column < np.percentile(column, 5)]
          choices = [np.percentile(column, 75),
          np.percentile(column, 25)]
          return np.select(conds,choices,column)

          df.set_index('Outcome',inplace=True)

          df = df.apply(lambda x: cut(x)).reset_index()

          >>> df
          Outcome Pregnancies Glucose BloodPressure SkinThickness Insulin BMI
          0 1 6.0 148.0 66.0 35.0 125.0 33.6
          1 0 1.0 89.0 66.0 29.0 125.0 26.6
          2 1 6.0 148.0 64.0 29.0 125.0 26.6
          3 0 1.0 89.0 66.0 29.0 125.0 28.1
          4 1 1.0 137.0 64.0 35.0 125.0 33.6

          DiabetesPedigreeFunction Age
          0 0.627 33.0
          1 0.351 31.0
          2 0.672 32.0
          3 0.351 31.0
          4 0.672 33.0





          share|improve this answer















          You can use apply on all columns except outcome, with the functions np.clip and np.percentile:



          import numpy as np

          percentile_df = df.set_index('Outcome').apply(lambda x: np.clip(x, *np.percentile(x, [25,75]))).reset_index()

          >>> percentile_df
          Outcome Pregnancies Glucose BloodPressure SkinThickness Insulin BMI
          0 1 6.0 148.0 66.0 35.0 125.0 33.6
          1 0 1.0 89.0 66.0 29.0 125.0 26.6
          2 1 6.0 148.0 64.0 29.0 125.0 26.6
          3 0 1.0 89.0 66.0 29.0 125.0 28.1
          4 1 1.0 137.0 64.0 35.0 125.0 33.6

          DiabetesPedigreeFunction Age
          0 0.627 33.0
          1 0.351 31.0
          2 0.672 32.0
          3 0.351 31.0
          4 0.672 33.0


          [EDIT] I misread the question at first, here is a way to change the 5th and 95th percentile to 25th and 75th respectively, using np.select:



          def cut(column):
          conds = [column > np.percentile(column, 95),
          column < np.percentile(column, 5)]
          choices = [np.percentile(column, 75),
          np.percentile(column, 25)]
          return np.select(conds,choices,column)

          df.set_index('Outcome',inplace=True)

          df = df.apply(lambda x: cut(x)).reset_index()

          >>> df
          Outcome Pregnancies Glucose BloodPressure SkinThickness Insulin BMI
          0 1 6.0 148.0 66.0 35.0 125.0 33.6
          1 0 1.0 89.0 66.0 29.0 125.0 26.6
          2 1 6.0 148.0 64.0 29.0 125.0 26.6
          3 0 1.0 89.0 66.0 29.0 125.0 28.1
          4 1 1.0 137.0 64.0 35.0 125.0 33.6

          DiabetesPedigreeFunction Age
          0 0.627 33.0
          1 0.351 31.0
          2 0.672 32.0
          3 0.351 31.0
          4 0.672 33.0






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 14 '18 at 16:31

























          answered Nov 13 '18 at 17:42









          saculsacul

          30k41740




          30k41740








          • 1





            I've never thought about it... why not? the documentation for pd.np.clip should just be the docs for np.clip. In any case, then I'll just delete the pd.

            – sacul
            Nov 13 '18 at 17:45








          • 1





            Never tried it myself, that's all. Also you can do np.percentile(x, [25, 75]). That version would get my vote :).

            – jpp
            Nov 13 '18 at 17:46








          • 1





            Thanks! Yeah, that's better!

            – sacul
            Nov 13 '18 at 17:48











          • What does *np.percentile does.I read about np.percentile but why * is used

            – Rookie_123
            Nov 13 '18 at 17:54











          • np.percentile(x, [25, 75]) returns values for the 25th and the 75th percentile, so you need to unpack that using * so that the 25th percentile gets passed to a_min and the 75th percentile gets passed to a_max of np.clip

            – sacul
            Nov 13 '18 at 19:33














          • 1





            I've never thought about it... why not? the documentation for pd.np.clip should just be the docs for np.clip. In any case, then I'll just delete the pd.

            – sacul
            Nov 13 '18 at 17:45








          • 1





            Never tried it myself, that's all. Also you can do np.percentile(x, [25, 75]). That version would get my vote :).

            – jpp
            Nov 13 '18 at 17:46








          • 1





            Thanks! Yeah, that's better!

            – sacul
            Nov 13 '18 at 17:48











          • What does *np.percentile does.I read about np.percentile but why * is used

            – Rookie_123
            Nov 13 '18 at 17:54











          • np.percentile(x, [25, 75]) returns values for the 25th and the 75th percentile, so you need to unpack that using * so that the 25th percentile gets passed to a_min and the 75th percentile gets passed to a_max of np.clip

            – sacul
            Nov 13 '18 at 19:33








          1




          1





          I've never thought about it... why not? the documentation for pd.np.clip should just be the docs for np.clip. In any case, then I'll just delete the pd.

          – sacul
          Nov 13 '18 at 17:45







          I've never thought about it... why not? the documentation for pd.np.clip should just be the docs for np.clip. In any case, then I'll just delete the pd.

          – sacul
          Nov 13 '18 at 17:45






          1




          1





          Never tried it myself, that's all. Also you can do np.percentile(x, [25, 75]). That version would get my vote :).

          – jpp
          Nov 13 '18 at 17:46







          Never tried it myself, that's all. Also you can do np.percentile(x, [25, 75]). That version would get my vote :).

          – jpp
          Nov 13 '18 at 17:46






          1




          1





          Thanks! Yeah, that's better!

          – sacul
          Nov 13 '18 at 17:48





          Thanks! Yeah, that's better!

          – sacul
          Nov 13 '18 at 17:48













          What does *np.percentile does.I read about np.percentile but why * is used

          – Rookie_123
          Nov 13 '18 at 17:54





          What does *np.percentile does.I read about np.percentile but why * is used

          – Rookie_123
          Nov 13 '18 at 17:54













          np.percentile(x, [25, 75]) returns values for the 25th and the 75th percentile, so you need to unpack that using * so that the 25th percentile gets passed to a_min and the 75th percentile gets passed to a_max of np.clip

          – sacul
          Nov 13 '18 at 19:33





          np.percentile(x, [25, 75]) returns values for the 25th and the 75th percentile, so you need to unpack that using * so that the 25th percentile gets passed to a_min and the 75th percentile gets passed to a_max of np.clip

          – sacul
          Nov 13 '18 at 19:33


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53286615%2fpandas-replace-certain-values-in-each-column%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Xamarin.iOS Cant Deploy on Iphone

          Glorious Revolution

          Dulmage-Mendelsohn matrix decomposition in Python