티스토리

kimbop
검색하기

블로그 홈

kimbop

tuna-kimbop.tistory.com/m

kimbop 님의 블로그입니다.

구독자
0
방명록 방문하기

주요 글 목록

  • [The Economist] Apple’s Vision Pro is a technical marvel. Will anyone buy it? vocab - sleek: smooth and glossy as if polished sleek dark hair // having a smooth well-groomed look - commercial flop: complete failure - in lieu of: in the place of : instead of - cluncky: clumsy in style - retrench: cut down - hoover up: "to remove something from a floor or other surface using a vacuum cleaner (= a machine that sucks up dust and dirt):" (Cambridge Dictionary) Summary - Unlike.. 공감수 0 댓글수 0 2023. 6. 6.
  • [The Economist] Will drone cops make American policing safer or just more intrusive? Drone cop (+: vantage point) It helps split-second decision (+) It offers profound evidence, while camera that officer currently wears do not show what the officer is doing (-) It is an equipment that police disrespect "citizen's right to policy" vocab - reconnaissance: preliminary survey to gain information - galvanize: to stimulate or excite as if by an electric shock - apprehend: arrest, seiz.. 공감수 0 댓글수 0 2023. 6. 3.
  • [Economist] Can the West win over the rest? - People often regard that the world is divided into two: Western bloc and alliance of China and Russia. However, it is wrong. More than 100 countires ("non-aligned countries") prefer neither each side. Their clout is even considerable. - Their economic power is growing; 45% of world's population, 18% of global GDP. - They often combine their power such as OPEC. Vocab (definition from Merriam-We.. 공감수 0 댓글수 0 2023. 4. 15.
  • [Economist] Can high-rise buildings solve London’s housing problems? Summary - Britain needs more houses due to population growth, especially in cities, but the supply of new housing is "not keeping up". (strict planning rules: green-belt around cities) - One way to accommodate more homes in a restricted area to construct is building residential skyscrapers (as New York and Hong Kong do) However, there are set of hurdles. 1) Tall buildings are expensive to constr.. 공감수 0 댓글수 0 2023. 4. 13.
  • [Economist] Stocks have shrugged off the banking turmoil. Haven’t they? Summary Bank failure always led the decrease of stock market. However, this time is different. 1. Investors are "betting on rate-cuts," (they expect the interest rates to decrease) and therefore are investing insectors that are more sensitive interest rates (such as tech companies). (Contrastingly, as real estate or financial companies is dependent on borrowing, so the increase in interest rates.. 공감수 0 댓글수 0 2023. 4. 11.
  • [Economist] A new study of studies reignites controversy over mask mandates - The effectiveness of pandemic policies still remains a topic of debate. Cochrane meta-analysis found no statiscally significant evidence of the effectiveness of mask mandates. However, supporters of mandates point the limitation of the research because there are many flaws in research. - The Cochrane meta-analysis only considered randomized controlled trials (RCTs). It is lack of reliable rese.. 공감수 0 댓글수 0 2023. 4. 5.
  • [Economist] Was your degree really worth it? College-wage premium (1980 in US) - led to a boom in seeking higher degree - Recently, the wage premium has become stagnated or begun to fall "more than a quarter of bachelor’s-degree programmes in America will lead to negative returns for most enrolled students"; except for several popular programmes - computer science, economics, math, getting a bachelor's degree in other majors brought negati.. 공감수 0 댓글수 0 2023. 4. 4.
  • [matplotlib] Merge two graphs into one twinx() import pandas as pd import matplotlib.pyplot as plt import numpy as np f, ax = plt.subplots(1,1) x_values = [0,1,2,3,4,5] y_values = [0,1,4,9,16,25] ax.plot(x_values, y_values, color='red', linestyle='dashed', linewidth=1, marker="o") x2_values = [0,1,2,3,4,5] y2_values = [1000,2000,3000,4000,5000,6000] ax2=ax.twinx() ax2.plot(x2_values, y2_values, color='darkblue', linestyle='dashed', l.. 공감수 0 댓글수 0 2023. 3. 1.
  • [The Economist] The humbling of Gautam Adani is a test for Indian capitalism Summary - "Gautam Adani was the world’s third-richest man" was questioned by an American short-seller about his company's finances. - To make India "a global manufacturing powerhouse", it is required to build "roads and reliable electricity." Therefore, India government offer subsidies to many large firms/conglomerates, even foreign firms. - Before India benefit from infrastructure (road, and el.. 공감수 0 댓글수 0 2023. 2. 12.
  • [Book] 40일간의 산업일주 Day 02 카카오의 PER 266배를 어떻게 해석할 것인가? - 인터넷 서비스업: 실물을 다루는 사업이 아님. 다른 산업에 비해 경기 변동에 덜 민감함 (검색광고, 모바일 광고 매출 주요 수입원) - 락인(lock-in)효과: "고객이 상품·서비스를 이용하고 나면 다른 상품이나 서비스로 '이용의 이전'을 하지 않는 현상" - 네이버, 카카오 모두 컨텐츠 사업, 핀테크 사업 등 사업 다각화. 카카오의 PER 266배는 기대수익률은 0.4%밖에 되지 않지만, 그만큼 투자자들의 높은 기대가 반영되었다고 볼 수 있음. 공감수 0 댓글수 0 2023. 2. 11.
  • [Book] 40일간의 산업일주 - Day 01 통신사가 '脫통신'을 외치는 까닭 - 통신사 영업이익 = ARPU * 이용자 수 - 각종 비용 - ARPU (Average Revenue Per User): "비싼 요금제 사용하는 고객이 많을수록 ARPU는 증가한다." - 2010년대 초 LTE 도입으로 인한 ARPU 상승, 하지만 통신비 인하 정책으로 인한 하락세. 5G 기술 도입으로 다시 상승할 것으로 전망 - 내용연수: useful life of asset - 국내 시장 한정이므로, 절대적인 시장 규모의 증가는 없다. (국민 1인당 평균 1대 이상 이동전화 소유) 영업이익을 올리기 위해서는 1) 기존의 고객들이 값비싼 ARPU를 이용하게 만들던지, 2) 타사 이용고객들을 유치하는 방법이 있다. - LTE -> 5G와 같이 서비스 변화가 클 때에는 .. 공감수 0 댓글수 0 2023. 2. 10.
  • [The Economist] TSMC is making the best of a bad geopolitical situation Summary - "Last year America strengthened its stranglehold on certain 'choke-point' technologies...to symie China's ambitions." - TSMC seems like "a strategy to move closer to its customers" - Apple (Phoenix, US), Sony (Japan) - Even though it seems that TSMC abandons Taiwan fabs, but it is not true. Fabs in other countries is just to provide "a baseline for expansion"; and the most of TSMC reso.. 공감수 0 댓글수 0 2023. 1. 21.
  • [pandas] merge/concat data-frame Sometimes, two data set should be merged to provide more accurate information. Merging data frame is divided into two parts: vertical and horizontal merging. 1) Vertical merging import pandas as pd df1 = pd.DataFrame({'A' : [1, 2, 3], 'B' : [11, 12, 13], 'C' : [21, 22, 23]}) df2 = pd.DataFrame({'A' : [4, 5, 6], 'B' : [14, 15, 16], 'C' : [24, 25, 26]}) print(df.concat([df1, df2])) print(df.concat.. 공감수 0 댓글수 0 2023. 1. 21.
  • [pandas] Data transformation - using current data to classify import pandas as pd df = pd.DataFrame({'a':[1,2,3,4,5]}) # create a 'b' column if a= 2)] df['b'][a.index] = 's4' a = df[df['a'] > 4] df['b'][a.index] = 'b4' print(df) # Second method. using 'Apply with function' def apply_function(a): if a < 2: return 's2' elif a < 4: return 's4' else: return 'b4' df['b'] = df['a'].apply(apply_function) # Map - when there is a certain categories without conditio.. 공감수 0 댓글수 0 2023. 1. 21.
  • [pandas] add new column / delete column 1. Column import pandas as pd df = pd.DataFrame({'a': [1,1,3,4,5], 'b': [2,3,2,3,4], 'c': [3,4,7,6,4]}) # 1. to simply add new column df['d'] = [1,3,6,4,8] # 2. add one number in that column (will be filled out with that number) df['e'] = 1 # +) calculated result can be also created as a new column. # check datatype first print(df.dtypes) df['f'] = df['a'] + df['b'] - df['c'] # delete a column d.. 공감수 0 댓글수 0 2023. 1. 21.
  • [pandas] Data type conversion (astype etc...) import pandas as pd df = pd.DataFrame({'date' : ['5/11/21', '5/12/21', '5/13/21', '5/14/21', '5/15/21'], 'sales' : ['10', '15', '20', '25', '30'], 'visitors' : ['10', '-', '17', '23', '25'], 'temp.' : ['24.1', '24.3', '24.8', '25', '25.4']}) # we need to check data type for each column (to change/edit data) print(df.dtypes) # try to change the value without data conversion df['edited sales'] = d.. 공감수 0 댓글수 0 2023. 1. 21.
  • [The Economist] What does China’s reopening mean for Latin America? Summary - Latin America had been developed by the commodities. - China reopnes its border "after three years of lockdowns." - Becuase of that reopening, there is some rumors that China may demand more commodities than the last three years; "price of copper jumped by 7% in a day" - From 2000, "trade with China grew from $12bn." By 2021, China became "South America's top trading partner" (central .. 공감수 0 댓글수 0 2023. 1. 20.
  • [pandas] Missing value Table of contents 0) Intro 1) Check the dataset whether it has any missing value 2) Delete the row / column that has any missing value 3) Replace the missing value with other neighboring value / average 0) Intro In the dataset, it is likely to have some missing values. To analyze the data, it is important to decide how to cope with this missing value. To make an example, we need NumPy. import pa.. 공감수 0 댓글수 0 2023. 1. 18.
  • [pandas] Sort Basically, in pandas, there are two basic ways to sort - (1) sort by index and (2) sort by value. 1) Sort by index df = pd.DataFrame({'a': [2,3,2,7,4], 'b': [2,1,3,5,3], 'c': [1,1,2,3,5]}) # ascending print(df.sort_index()) # descending print(df.sort_index(acending=False)) If you want to reset the index information as the one we sorted, df.sort_index(ascending=False, inplace=True) # (1) print(df.. 공감수 0 댓글수 0 2023. 1. 18.
  • [The Economist] An economic calm before the storm? Summary - Inflation in the US is slowing - Stabilized unemployment rate (lowest since 1969): because of low labor force participation - Even though the US economy seems to be gradually stabilized, still there is posibility to "vault it (American economy) into recession" as "monetary policy operates with a lag." Vocab (definition from Dictionary.com) pole-vaulting - a field event in which a leap .. 공감수 0 댓글수 0 2023. 1. 17.
  • [The Economist] The age of the grandparent has arrived Summary - Change of grandparenting - two demographic trend; first, "people are living longer." (global life expectance 51 (1960) -> 72); second, "families are shrinking" (fewer babies) - As the number of grandparenting vaulted, it is expected to drive "the movement of women into paid work." - Once grandparents (mostly grandmothers) dawn to take care of their grandchildren, they are less likely t.. 공감수 0 댓글수 0 2023. 1. 17.
  • [The Economist] Warnings from history for a new era of industrial policy Summary 1. Recent interventions are mostly "in an economy wheere it is nascent or absent" 2. As firms discover something and they fear for information leakage, (when the product is in the nascent stage) governments support those firms to mature. 3. Those kind of subsidies from governments "influenced the global distribution of production." "Interventions often raise costs and thus hurt consumers.. 공감수 0 댓글수 0 2023. 1. 12.
  • [The Economist] Why the gusty North Sea could give Europe an industrial edge Summary 1. "...the promise of cheap, abundant wind power is attracting industry and infrastructure to Europe’s northern coasts" 2. Europe's northern coasts - The North Sea posesses a huge basin of potential energy: strong winds & relative shallow sea 3. Some Europe's firms are considering to move their production facilities to the Northern Europe because of saving energy Vocab (definition from D.. 공감수 0 댓글수 0 2023. 1. 11.
  • [The Economist] What America’s protectionist turn means for the world Summary 1. American workers' complaints about global frims that get subsidies from US govt. 2. Subsidy policy is to protect American industrial base. It is expected to "fend off the challenge from a rising China and re-orient the economy towards greener growth." 3. However, America's allies are "startling shift." It is because of the movement when Donald Trump levied tarrifs on products from Ame.. 공감수 0 댓글수 0 2023. 1. 10.
  • [The Economist] How technology is redrawing the boundaries of the firm Summary 1. With the new working environment - Zoom or Microsoft Teams, the size of skilled freelance workers in US is surged. ("$247bn in 2021, up from about $135bn in 2018.") 2. "Sectors particularly compatible with remote work: technology, finance and professional services." 3. One of the reason why Increase the number of overseas workers (working remotely) is "barriers to immigration." 4. Of .. 공감수 0 댓글수 0 2023. 1. 9.
  • [The Economist] How China’s reopening will disrupt the world economy Summary 1. The end of "zero-covid" policy causes the increase the number of cases; "tens of millions of people are catching it every day" 2. Even though China's economy "could contract in the first quarter," it is expected to "rebound sharply" (due to its high demand for "goods, services, and commodities") 3. As the end of the "zero-covid" policy also allows "shoppers and travellers" to "spend m.. 공감수 0 댓글수 0 2023. 1. 6.
  • [The Economist] A $44bn education Summary 1. The failure of Elon Musk's leadership also affected one of his other firms - Tesla. 2. He found "that the right to speech conflicts with other rights" - safety. 3. He decided to "outlaw(ing) the reporting of others' real-time locations" 4. He "cracked down" "legal-but-nasty content." → "hateful tweets recorded one-third fewer views than before the takeover" 5. He "limited speech when .. 공감수 0 댓글수 0 2023. 1. 5.
  • [pandas] value_counts() 특정변수 least occurrence로 정렬하기 value_counts() import pandas as pd df = pd.read_csv(url, sep='|') #|로 나뉘어진 부분 기준 분리 users = df users.set_index('user_id', inplace=True) #inplace=True : 기존 변수에 덮어쓰기; 다른 데이터 볼때 user_id는 기본으로 딸려오는 느낌 users.age.value_counts(ascending=True) value_counts를 통해 특정 변수의 (특정 column) 빈도 / counts를 구할 수 있다. age가 7, 10, 11, 66, 73인 data가 하나임을 확인할 수 있다. 공감수 0 댓글수 0 2022. 9. 24.
  • [NumPy] np.ceil(), np.copysign(), np.intersect1d() np.ceil() 소수 형태의 숫자를 해당 소수보다 크고 가장 가까운 정수로 변환시켜준다. import numpy as np z = 7.12354 print(np.ceil(z)) 결과값이 8.0이 나오는 것을 확인 할 수 있다. np.copysign() np.copysign(a, b)일 경우, a에 해당하는 값이 b의 부호를 따른다. a = 8, b = -4일 경우, a = -8로 바뀐다. import numpy as np a = 8 b = -4 print(np.copysign(a, b)) 결과값이 -8.0이 나오는 것을 확인 할 수 있다. Practice How to round away from zero a float array ? (출처: https://github.com/rougier/numpy-1.. 공감수 0 댓글수 0 2022. 9. 12.
  • [pandas] str.slice() & lambda - 데이터셋에서 맨 앞에 있는 화폐단위 삭제 및 float로 변환 str.slice() import pandas as pd url = '데이터 가져올 링크' df = pd.read_csv(url, '\t') chipo = df chipo.item_price.str.slice(1).astype(float).head() 데이터에서 금액이 string형태로 되어있을 때가 많을 텐데, 그럴 때 간단하게 화폐단위를 제거하는 방법이 있다. 바로 str.slice()이다. item_price라는 데이터 셋 내의 column/variable/determinants가 있다. 형태는 다음과 같이 생겼다. item_price 맨 앞에 $표시 때문에 다른 계산에 어려움이 있을 때가 있다. 따라서 $표시를 없애야 한다. str.slice(start=값, stop=값, step=값) 위 코드에.. 공감수 0 댓글수 0 2022. 9. 12.
    문의안내
    • 티스토리
    • 로그인
    • 고객센터

    티스토리는 카카오에서 사랑을 담아 만듭니다.

    © Kakao Corp.