Affichage des articles dont le libellé est How to drop the row?. Afficher tous les articles
Affichage des articles dont le libellé est How to drop the row?. Afficher tous les articles

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'
os.chdir(os.path.dirname(join_file2))
join_data2 = pd.read_csv(os.path.basename(join_file2),sep='|',
                header=None ,
                usecols=[0,1,2,3,4,11],
                names=['STDR_YM_CD', 'TRDAR_CD', 'TRDAR_CD_NM', 'SVC_INDUTY_CD','SVC_INDUTY_CD_NM','THSMON_SELNG_AMT'],
                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?