t4.py 474 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. @Auther :liuyuqi.gov@msn.cn
  5. @Time :2018/7/8 22:15
  6. @File :t4.py
  7. '''
  8. import pandas as pd
  9. df = pd.DataFrame([{"A": "11", "B": "12"}, {"A": "1111", "B": "1211"}])
  10. df["isdploy"] = False
  11. df.loc[0, "isdploy"] = True
  12. df = df[df["isdploy"] == False]
  13. # df["is"][0] = True
  14. # df.loc[0][2] = True
  15. # df.loc[:, "is"] = True
  16. # df.set_value(index="0", col="isdploy", value=False)
  17. # print(df.get_value(index="isdploy", col=0))
  18. print(df)