import pandas as pd

museum = pd.read_csv("data/museum_3.csv", dtype={'지역번호': str})
number = pd.read_csv("data/region_number.csv", dtype={'지역번호': str})

# 여기에 코드를 작성하세요
combined = pd.merge(museum, number, on='지역번호', how='left')

combined

 

'자동제어 > Python for robotics' 카테고리의 다른 글

iqr  (0) 2023.03.25
.isnull(), .sum(), .dropna(inplace=True)  (0) 2023.03.24
groupby(), .sort_values(by=),  (0) 2023.03.24
.map(), .rename(column={}, inplace = True)  (0) 2023.03.21
.str.split()  (0) 2023.03.21
nation_groups = df.groupby('brand_nation')
nation_groups.count()
nation_groups.max()
nation_groups.mean()
nation_groups.first()
nation_groups.last()
nation_groups.plot()
import pandas as pd

df = pd.read_csv('data/occupations.csv')

# 여기에 코드를 작성하세요
occu_group = df.groupby('occupation')
occu_group.mean().sort_values(by='age')​
import pandas as pd

df = pd.read_csv('data/occupations.csv')

# 여기에 코드를 작성하세요
df_gr = df.groupby('occupation')
df.loc[df['gender'] == 'M', 'gender'] = 0
df.loc[df['gender'] == 'F', 'gender'] = 1
df_gr.mean()['gender'].sort_values(ascending=False)

 

'자동제어 > Python for robotics' 카테고리의 다른 글

.isnull(), .sum(), .dropna(inplace=True)  (0) 2023.03.24
merge  (0) 2023.03.24
.map(), .rename(column={}, inplace = True)  (0) 2023.03.21
.str.split()  (0) 2023.03.21
문자열 필터링(.str.contains())  (0) 2023.03.19

해설
지역번호를 이용해서 지역명을 알아내고자 합니다.

각 지역번호에 해당하는 지역명을 만들기 위해서는, 지역번호와 지역명에 대한 파이썬 사전 (dictionary)이 필요한데요.

지역번호와 지역을 참고해서, .map() 메소드에 넣어줄 사전을 만들어 봅시다.

import pandas as pd

df = pd.read_csv("data/museum_3.csv", dtype={'지역번호': str})

region = {
    '02': '서울시',
    '031': '경기도', '032': '경기도',
    '033': '강원도', 
    '041': '충청도', '042': '충청도', '043': '충청도', '044': '충청도',
    '051': '부산시', 
    '052': '경상도', '053': '경상도', '054': '경상도', '055': '경상도',
    '061': '전라도', '062': '전라도', '063': '전라도',
    '064': '제주도',
    '1577': '기타', '070': '기타'
}
# 코드를 작성하세요.
df['지역번호'] = df['지역번호'].map(region)
df['지역번호']
df.rename(columns={'지역번호':'지역명'}, inplace=True)
df

 

import pandas as pd

df = pd.read_csv('data/museum_2.csv')

# 여기에 코드를 작성하세요
phone_number = df['운영기관전화번호'].str.split(pat='-', n=2, expand=True)
df['지역번호'] = phone_number[0]
df

 

 

Script Tip 1: Keep it short.

No one in the history of speaking ever complained that a booth presentation wasn’t long enough. Say your peace and exit stage left. Aim for 5 minutes in length, which is just long enough to explain the basics, tease the benefits and get out of the way. If you’re running over 10 minutes, get someone outside your company to tell you what to cut. Your audience will thank you for respecting their time.

 

Script Tip 2: Keep it simple.

Trade show presenters often try to squeeze in every possible product benefit, just in case #67 really sways ‘em. Resist the temptation. Stick to your 2-3 biggest benefits that best differentiate you from competing booths. Don’t try to answer every potential question; you want your audience members to have questions. That’s what motivates them to stay in your booth and talk to your staff after you’re done.

 

Script Tip 3: Talk like you talk.

Don’t force your audience to decipher overly complex or flowery prose. Set them at ease with a friendly, conversational style. “You’ll increase sales by 25%” makes the point quicker and easier than “You’ll experience a 25% increased sales delta for the balance sheet metrics I referred to in slide 3.” And avoid vague, overcooked marketing-speak; trust me, everyone in your industry “facilitates a complete turn-key solution.”

 

Script Tip 4: Speak to them, not “them.”

Audience members care about themselves, not your imaginary sample customers. Always aim your wording at the people in the chairs in front of you, i.e. “ABC software lowers YOUR CRM costs while keeping YOUR profits up” instead of “Those in the CRM industry will lower their costs…”

 

Script Tip 5: Define your terms.

Don’t assume everyone in your audience knows the lingo; many don’t, and are too embarrassed to ask. Enlighten them (“HDMI, which as you know stands for ‘high-definition multimedia interface’…”) and bask in their gratitude.

 

Script Tip 6: Draw the bottom line.

Customers only embrace a feature when they know how it actually helps them. Link your feature (“It weighs one-third less…”) to their bottom-line benefit (“…which lowers your shipping costs by 23%.”), which almost always involves reducing time, effort and expense, and raising income, ease and enjoyment.

 

Script Tip 7: Be concrete.

Familiar, evocative imagery beats vague, bland statements every time. “Move-in day can be stressful” is accurate, but “Imagine your knees wobbling as you lug 78 heavy boxes across your dried-out front lawn on a scorching July day…” paints the picture, evokes the pain point, and gets the sale.

 

Script Tip 8: Color it in.

Feature lists are painfully dull and hard to remember. Use stories, statistics, analogies, quotes, props, tap dancing, anything surprising and colorful to drive your point home. The more creatively you say it, the more your audience will understand it, appreciate it, remember it and act on it.

 

Script Tip 9: Don’t fear the chair people.

No one likes listening to lectures, especially in a trade show environment, with so many distractions so close by. Spontaneous interaction with your audience turns your monologue into an engaging conversation and shows your audience you really care about them. Ask questions and welcome feedback. It lowers your speaking anxiety too!

 

Script Tip 10: Bring the funny.

Humor keeps your audience relaxed and attentive, and paints you as someone they’d enjoy working with. Find common pain points and make light of them. If comedy just ain’t your thing, bring free stuff.

import pandas as pd

df = pd.read_csv('data/museum_1.csv')

# 여기에 코드를 작성하세요
is_university = df['시설명'].str.contains('대학교')
is_university
df.loc[is_university == True, '분류'] = '대학'
df.loc[is_university == False, '분류'] = '일반'

df

'대학교'가 문자열에 포함되어 있으면 True로, 그렇지 않으면 False

0      False
1      False
2      False
3      False
4       True
       ...  
896    False
897    False
898    False
899    False
900    False
Name: 시설명, Length: 901, dtype: bool

e

+ Recent posts