
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
안녕하세요
아래와 같이 에러 내용이 나옵니다
도움 부탁 드립니다

작성한 코드 및 에러 메세지
import pandas as pd
import numpy as np
data ={
'name':['영희','철수','순희'],
'age':[20,10,15]
}
df = pd.DataFrame(data)
df['city'] = ['서울','부산','서울','목산']
cond = df['age'] < 20
print(df[cond])
아래는 에러코드입니다
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TypeError Traceback (most recent call last)
<ipython-input-30-a48eada33c8b> in <module>
1 df['city'] = ['서울','부산','서울','목산']
2
----> 3 cond = df['age'] < 20
4 print(df[cond])
5 frames
/usr/local/lib/python3.8/dist-packages/pandas/_libs/ops.pyx in pandas._libs.ops.scalar_compare()
TypeError: '<' not supported between instances of 'str' and 'int'
