小编Lin*_*_30的帖子

pandas 数据框列中值的条件替换

假设我有一个 Pandas 数据框,列值是这样的 df.age = {25, 35, 76, 21, 23, 30}

我想做这样的就地替换:

如果 df.age >=25 和 df.age <= 35:将该值替换为 1 否则:将该值替换为 0

我试过这个 df[df.age >= 7.35 and df.age <= 7.45, 'age'] = 0 但似乎不起作用。

python pandas

5
推荐指数
2
解决办法
7151
查看次数

在springboot应用程序中如何删除日志中的自动配置报告

在我的 springboot 应用程序中,我在使用 Orbitz consul 客户端和 spring-consul 时生成了以下日志。该日志是在执行使用 Orbitz 的 consul 客户端的周期任务(每 2 分钟一次)时生成的。我想关闭以下日志,因为它们不必要地填充日志文件。

AutoConfigurationReportLoggingInitializer [pool-45-thread-1] [DEBUG] [] 


=========================
AUTO-CONFIGURATION REPORT
=========================


Positive matches:
-----------------

    ConfigurationPropertiesRebinderAutoConfiguration matched
    ConfigurationPropertiesRebinderAutoConfiguration#configurationPropertiesBeans matched
    ConfigurationPropertiesRebinderAutoConfiguration#configurationPropertiesBeans matched

Negative matches:
-----------------

   ConsulAutoConfiguration.RetryConfiguration did not match
   EncryptionBootstrapConfiguration.RsaEncryptionConfiguration did not match
      - required @ConditionalOnClass classes not found: org.springframework.security.rsa.crypto.RsaSecretEncryptor (OnClassCondition)

   EncryptionBootstrapConfiguration.VanillaEncryptionConfiguration did not match
      - @ConditionalOnMissing classes not found: org.springframework.security.rsa.crypto.RsaSecretEncryptor (OnClassCondition)
      - Keystore nor key found in Environment (EncryptionBootstrapConfiguration.KeyCondition)


Exclusions:
-----------

    None


Unconditional classes:
----------------------

    None
Run Code Online (Sandbox Code Playgroud)

logging spring-boot

4
推荐指数
1
解决办法
3975
查看次数

标签 统计

logging ×1

pandas ×1

python ×1

spring-boot ×1