lundi 13 février 2017

How to drop the row?

Vote count: 0

I'm handling my data now.

I got a problems when I using pandas

Here is the code.

import pandas as pd
import numpy as np
import os

join_file2 = r'D:\raw data\서울시 공공데이터\5.16년7월분\17.상권-추정매출\tbsm_trdar_selng.txt\tbsm_trdar_selng_utf8.txt'
join_data2 = pd.read_csv(os.path.basename(join_file2),sep='|',
                header=None ,
                dtype = { '0' : int},
                encoding='utf-8' )

join_data2_d = join_data2[(join_data2.SVC_INDUTY_CD != 'CS000000') | (join_data2.SVC_INDUTY_CD != 'CS100000') | (join_data2.SVC_INDUTY_CD != 'CS200000')| (join_data2.SVC_INDUTY_CD != 'CS300000') ]

When I print join_data2.head(), I got this data enter image description here

and print join_data2_d, I got this which doesn't drop rows. enter image description here

How can I fix it??

asked 21 secs ago

Let's block ads! (Why?)

How to drop the row?

Aucun commentaire:

Enregistrer un commentaire