다음과 같은 데이터 프레임이 있으며 sic2
열의 값에 따라 'string'을 삽입하고 싶습니다.pandas dataframe 다른 열 값의 범위에 따라 값을 삽입하십시오.
conm sic2
115466 ALLEGION PLC 34.0
115471 AGILITY HEALTH INC 80.0
115473 NORDIC AMERICAN OFFSHORE 44.0
115474 AAD 54.0
115477 DORIAN LPG LTD 44.0
115484 NOMAD FOODS LTD 20.0
115486 ATHENE HOLDING LTD 63.0
115490 MIDATECH PHARMA PLC 28.0
115495 MOTIF BIO PLC 28.0
문자열로 sic2
숫자 범위는 아래와 같다.
1-9 Agriculture, Forestry and Fishing
10-14 Mining
15-17 Construction
18-19 not used
20-39 Manufacturing
40-49 Transportation, Communications, Electric, Gas and Sanitary service
50-51 Wholesale Trade
52-59 Retail Trade
60-67 Finance, Insurance and Real Estate
70-89 Services
91-97 Public Administration
99-99 Nonclassifiable
0 -1 Agricultural Production-Crops
어떻게이 적용 전체 대형 데이터 세트처럼 보이는 pandas.DataFrame
을 만들 수 있습니까?
여러 조건 코드를 시도했지만 실패했습니다.
conm sic2 industry
115466 ALLEGION PLC 34.0 Manufacturing
115471 AGILITY HEALTH INC 80.0 Services
115473 NORDIC AMERICAN OFFSHORE 44.0 Transportation, Communications, Electric, Gas and Sanitary service
115474 AAD 54.0 Retail Trade