<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>맨땅에 헤딩하는 사람</title>
    <link>https://purplechip.tistory.com/</link>
    <description>한번 둘러보세요 :)</description>
    <language>ko</language>
    <pubDate>Wed, 8 Apr 2026 19:09:03 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>purplechip</managingEditor>
    <image>
      <title>맨땅에 헤딩하는 사람</title>
      <url>https://tistory1.daumcdn.net/tistory/3873050/attach/d86f30314d204b688c49d2ea98523322</url>
      <link>https://purplechip.tistory.com</link>
    </image>
    <item>
      <title>2020 하반기 금융결제원 공채 전산직 2차 면접 후기</title>
      <link>https://purplechip.tistory.com/57</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;이전 글은 아래 포스팅을 참고바랍니다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;a href=&quot;https://purplechip.tistory.com/56&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;2020/11/12 - [취업] - 2020 하반기 금융결제원 공채 전산직 1차 면접 후기&lt;/a&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;운이 좋았다. 더 정확히 말하자면 1차 면접에서 생각보다 많은 인원을 합격시켜 내가 포함된 것 같다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;1차 면접 6배수, 2차 면접 3배수라 추정된다. 그렇기에 내가 그동안 붙었던 것 같다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;2차면접은 임원면접이다. 예전 임원면접은 느낌이란 것이 상당히 중요했던 것으로 여겨졌고 실제로 결과도 그러했다고 생각한다. 일례로 어떤 블로그에서 본 글이었는데, 다대다 면접에서 &quot;성실하신가요?&quot;란 단 하나의 질문에 &quot;네&quot; 라는 단 하나의 답변만을 했던 지원자가 붙었다고 한다 (물론 그러면 안된다). 면접관 입장에서는 애초에 낙이라고 생각했던 지원자가 단순명료한 대답을 한 것에 대해 흥미를 보이고 호기심이 생겨 합격시켰다는 것이다. 이처럼 과거의 임원면접은 정성적인 성격을 띄고 있었다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;그러나 금융결제원의 임원면접은 정량적이라는 느낌이 강하게 들었다. 면접위원들은 임원 뿐만이 아니라 외부위원과 인사팀장을 더한 7명으로 구성되어 있었고 질문은 일관성을 확인하는 질문, 인성적인 부분을 검토하는 질문 등으로 이루어져 있었다. 특히 일관성을 중요하게 여기는 것 같다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;질문은 철저하게 자기소개서 및 질문에 대한 자신의 대답을 기반으로 나온다. 긴장했던 것도 있고 생각지도 못한 질문을 받았기에 면접은 철저하게 망했다. &lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;그리고 결과가 나왔다. 이번에도 &quot;그러나 그것이 실제로 일어났습니다&quot; 같은 일을 바랐지만 현실은 더더욱 냉정하고 엄격하단 사실을 다시 한번 깨달았다. 준비가 되어있지 않은 사람에게 기회는 주어지지 않는다. &lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;초심자의 행운은 여기까지였다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;금결원 취업을 준비하며 깨달은 사실 중 하나는 금융결제원의 채용 정보가 인터넷에서 찾아볼 수 없을 정도로 드물다는 것이었다. 있다고 해도 2007년 안팎의 정보니 크게 와닿질 않는다. 그러던 와중 금결원 지원자 오픈채팅방에서 필기시험 기출문제 정보를 선배들에게 받은 지원자들끼리 정보를 공유하는 현상을 바라보며 사회에 진출하기도 전에 사회의 격차를 느끼는 아이러니함을 맛보았다. 그래서 누군가에게 조금이나마 정보가 되길 바라는 마음에서 이 글을 쓴다. 이번 채용 시즌에서 많은 기업에 지원했지만 전부 후기를 작성하지 않는 이유가 바로 이것이다. 다른 것들은 어느 정도 정보를 찾을 수 있었다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;마지막으로 억울한 점 하나. 채용 검진은 되도록 합격자 발표 후 시행했음 하는 바람이다. 피뽑탈은 너무나 가슴이 아프다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>취업</category>
      <category>2차면접</category>
      <category>금결원</category>
      <category>금융결제원</category>
      <category>임원면접</category>
      <author>purplechip</author>
      <guid isPermaLink="true">https://purplechip.tistory.com/57</guid>
      <comments>https://purplechip.tistory.com/57#entry57comment</comments>
      <pubDate>Sat, 12 Dec 2020 10:14:47 +0900</pubDate>
    </item>
    <item>
      <title>2020 하반기 금융결제원 공채 전산직 1차 면접 후기</title>
      <link>https://purplechip.tistory.com/56</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;이 글은 아래 포스팅에서 연결되는 글이다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;a href=&quot;https://purplechip.tistory.com/51&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;2020/10/10 - [취업] - 2020 하반기 금융결제원 공채 전산직 필기 후기&lt;/a&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;운이 좋아 필기 시험을 합격해 1차 면접까지 보고 왔다. 대체 어떤 부분에서 타 지원자에 비해 우위를 점했는 지 짐작이 안가지만 나에겐 정말 좋은 기회가 주어졌다 생각한다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;금융결제원의 전형 절차 내 디테일한 진행 방식은 매년 조금씩 달라지고 있는 듯 하다. 면접의 경우도 블로그에서 알아본 정보(매우 적은 표본이지만)와 다른 방식으로 진행되었다. 토론면접과 일반면접 총 두 가지 면접을 진행했다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;토론면접&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;A, B조가 나뉘어 하나의 계약을 양사의 입장에서 협상하는 방식으로 진행되었다. 계약 관련된 문서를 읽고 조별로 전략을 토의한 후 단가 등 각 부분에 대해 양사가 협상을 진행한다. 협상이 이루어지면 점수를 얻는 방식이라 협상이 원활하게 합의가 되도록 조율하는 것이 중요하게 작용하지 않을까 하는 생각이다. 이런 토론 면접은 처음이라 당황스러웠는데,&amp;nbsp; 두 가지 측면에서 평가가 가능할 것 같다. 첫 번째는 논리적인 근거를 제시할 수 있는 논리력, 두 번째는 협상을 이루기 위한 조율 또는 협의 능력이다. 난 두 번째에 비중을 좀 더 두었는데 평가 기준이 어떤 지는 모르기에 잘한 지는 모르겠다.&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;일반면접&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;먼저 전산직의 경우 코딩테스트를 본다. 그러나 이번 코딩테스트는 못푸는 사람이 없을 정도로 난이도가 상당히 쉬웠기에 변별력은 떨어졌다. 이러한 조건에서 중요한 것은 얼마나 깔끔한 코드를 구현하는가일 것이다. 면접은 다대일 면접으로 코딩에 대한 설명, 그리고 자소서 기반 설명을 위주로 진행된다고 면접 대기 시간에 공지받았지만 내 경우 실제 면접에서 자소서에 관한 질문은 크게 받지 않았다. 오히려 인성검사를 기반으로 한 결과에서 내 특성들이 다양한 상황에서 어떻게 발현되는지를 중점적으로 물어보는 인성면접의 느낌이 강했다. 직무에 대한 면접은 크게 이루어지지 않아 그 점이 조금 아쉬웠다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;결과적으로 이번에도 크게 기대는 하지 않는다. 너무 어려웠고 다른 것들에 집중해야겠다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;+ 설마 붙을까 싶었다. 그러나 그것이 또 일어났습니다.. 다음 과정은 아래 포스팅에서 확인할 수 있다. 과연 이 길의 끝은 어떻게 될 것인가?&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;a href=&quot;https://purplechip.tistory.com/57&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;2020/12/12 - [취업] - 2020 하반기 금융결제원 공채 전산직 2차 면접 후기&lt;/a&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;+ 채용시즌이라 그런지 많은 분들께서 댓글로 코딩테스트 관련 문의를 하고 계신다. 자세히 기술은 못하지만, 체감 난이도는 프로그래머스 1.5 레벨 정도가 아니었나 싶다. 그러나 이후에도 이 정도의 난이도로 출제되겠단 단정은 안했으면 좋겠다. 난이도를 조절하는 과정에서 극단적인 난이도가 출제됐을 뿐이고 2021년에는 문제가 훨씬 더 어려워질 것이라 생각한다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;</description>
      <category>취업</category>
      <category>공채</category>
      <category>금융결제원</category>
      <category>면접</category>
      <author>purplechip</author>
      <guid isPermaLink="true">https://purplechip.tistory.com/56</guid>
      <comments>https://purplechip.tistory.com/56#entry56comment</comments>
      <pubDate>Thu, 12 Nov 2020 03:03:46 +0900</pubDate>
    </item>
    <item>
      <title>2020 하반기 NH투자증권 공채 IT직무 필기시험 후기</title>
      <link>https://purplechip.tistory.com/55</link>
      <description>&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;잠도 안오고 이전에 봤던 NH투자증권 공채 필기시험에 대한 후기를 작성한다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;농협은 공개채용 시즌 모든 계열사가 동시에 필기 시험을 보는 방식으로 진행된다. NH투자증권을 비롯한 여러 계열사가 같은 장소에서 동시에 시험을 봤다. 다만 시험 내용은 계열사마다 논술이 추가되는 등 약간씩 다르다.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;NH투자증권의 경우 인성평가, 직무능력평가(PSAT), 직무상식평가로 구성되었다. 인성평가에서 특이한 점은 서류 지원을 하면서 온라인으로도 본다는 점이다. 필기시험의 인성평가와 서류 접수의 인성평가가 크로스체크되어 신뢰도를 판단하고 성향을 판단하는 지는 물음부호가 붙지만 웬만하면 일관성있게 해주는 것이 좋아보인다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;직무능력평가&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;직무능력평가의 난이도는 상당히 어려운 편이었다. 이전 금융결제원의 필기시험 후기와 비슷하게 의사소통 영역 문제 다수, 수리 자료해석 문제 다수가 나왔다. 특히 글을 읽고 정보를 파악하는 능력을 중요시여기는 것처럼 느껴졌는데 HTML의 태그 관련 설명 글을 제시하고 HTML을 작성하거나 틀린 부분을 찾는 문제, 통계 언어 R의 일부 함수에 대한 글을 제시하고 이에 대한 사용법을 묻는 문제 등 참신하다면 참신했다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;직무상식평가&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;뒤통수를 세게 얻어맞은 느낌이다. 분명히 데이터베이스, 전자계산기 구조 등의 문제가 출제된다고 홈페이지에 명시돼 있었는데 딥러닝, 블록체인에 관한 문제가 거의 대부분이었다. 또한 농협의 경우 필기시험은 항상 농업 이해, 농협 추진 사업 등의 문제가 출제된다 명시했지만 3문제밖에 안나왔다. 그것도 협동조합의 정말 디테일한 역사(가령 미국의 어떤 협동조합이 최초고 이는 실패로 끝났다 등),&amp;nbsp; 협동조합의 이해를 묻는 문제, 대한민국의 농업운동(여러가지가 있다)을 순서대로 기재하라는 등 문제가 출제되었다. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;준비했던 것과 영 딴판의 문제들이라 많이 애를 먹었고 아마 탈락이 아닐까 싶다. 정말 어려웠다. 또한 삼성의 GSAT와 같이 오답 선택 시 감점이 존재하였다. 운이 좋다면 붙겠지..&lt;/span&gt;&lt;/p&gt;</description>
      <category>취업</category>
      <category>IT</category>
      <category>NH투자증권</category>
      <category>농협</category>
      <category>필기시험</category>
      <author>purplechip</author>
      <guid isPermaLink="true">https://purplechip.tistory.com/55</guid>
      <comments>https://purplechip.tistory.com/55#entry55comment</comments>
      <pubDate>Thu, 12 Nov 2020 01:36:23 +0900</pubDate>
    </item>
    <item>
      <title>키움증권 Open API+ 구현 상 issue 해결 | python</title>
      <link>https://purplechip.tistory.com/45</link>
      <description>&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;일봉 데이터를 DB화하는 과정을 구현하며 여러 issue를 겪었다. 키움증권 Open API+는 사용 메뉴얼이 있지만 반환 데이터나, 제약사항에 대한 자세한 내용은 기술되어 있지 않다. 이러한 문제들은 키움 Open API+ 고객문의 게시판에서 질의를 통해 해결해야 한다. 나 역시 고객 문의 게시판과 사용 메뉴얼을 참고해가며 당면한 여러 issue를 해결하였고 이 글에서는 그 과정들을 게시하겠다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;1. 조회데이터 부호&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;가끔씩 몇몇 데이터를 수신받으면 '--4500' 혹은 '+-4500'와 같은 꼴을 가진다. 이는 키움 HTS나 MTS에서 매수/매도 여부와 직전대비 증감 여부를 동시에 표현하기 위해 사용하는 부호 방법이다. 과 고객문의 게시판에서 종종 이런 질문들이 올라오며 이에 대한 답은 다음과 같다.&lt;/span&gt;&lt;/p&gt;
&lt;blockquote data-ke-style=&quot;style2&quot;&gt;해당 부호의 의미는 첫번째 부호가 색상(빨강/파랑)표시이고, 두번째 부호는 등락을 의미합니다.&lt;br /&gt;가령 +-4000 이면 해당데이터를 화면상 빨강색으로 표시하라는 의미이고 전일/전틱 대비 하락 이라는 의미 입니다.&lt;br /&gt;이러한 부호값은 영웅문4 HTS, 영웅문S MTS 등의 매체들에서 사용되고 있는 값이며&lt;br /&gt;OpenAPI 역시 동일한 포맷의 데이터를 수신하고 가공없이 전달하는 것을 원칙으로 하기에 그대로 전달되고 있습니다.&lt;br /&gt;불필요한 경우 Trim 하거나 Left, Right 등의 문자열 편집함수로 짤라내어 사용하셔도 되겠습니다.&lt;br /&gt;&lt;br /&gt;개발단계에서 사용하시는 TR의 데이터들을 영웅문4 HTS 와 비교/검증 하며 진행하시기 바랍니다.&lt;/blockquote&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;이는 요청 OPT에 따라 조금씩 다른 의미를 가진다. 일봉같은 가격의 경우 음수 값이 없으므로 아예 Trim 하는 것도 좋은 방법이지만 기관투자자별 거래량의 경우 음수가 의미를 가지므로 부호를 잘 살려주어야 한다. 통상적으로 거래량은 빨간색이 매수, 파란색이 매도를 의미하므로 첫 번째 부호에 따라 값을 결정하면 된다.&amp;nbsp; 그 외 다른 OPT에 데이터를 수신받을 때는 TR 데이터를 영웅문4 HTS와 비교하거나 키움증권 Open API+ 고객문의 게시판을 이용하는 수 밖에 없겠다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;2. Zip Error 14&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;multiprocessing을 사용하다보니 다음과 같은 에러를 발견하였다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-origin-width=&quot;0&quot; data-origin-height=&quot;0&quot; width=&quot;228&quot; height=&quot;NaN&quot; data-ke-mobilestyle=&quot;widthContent&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/oVNAT/btqLGXDrcM5/kdyfFeMaanKA7KWB5XRB2k/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/oVNAT/btqLGXDrcM5/kdyfFeMaanKA7KWB5XRB2k/img.png&quot; data-alt=&quot;[그림 1] multiprocessing 사용 시 에러&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/oVNAT/btqLGXDrcM5/kdyfFeMaanKA7KWB5XRB2k/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FoVNAT%2FbtqLGXDrcM5%2FkdyfFeMaanKA7KWB5XRB2k%2Fimg.png&quot; data-origin-width=&quot;0&quot; data-origin-height=&quot;0&quot; width=&quot;228&quot; height=&quot;NaN&quot; data-ke-mobilestyle=&quot;widthContent&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;[그림 1] multiprocessing 사용 시 에러&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;이에 대해 역시 고객문의 게시판에 문의한 결과 OPT 계열의 동일한 TR 서비스를 여러 프로세스가 반복적으로 요청할 경우 해당 오류가 발생할 가능성이 높다는 답변을 얻었다. multiprocessing을 사용해서 일봉, 거래량 데이터를 업데이트 하던 방식은 각각의 프로세스가 여러 기업 코드를 할당받아 일봉, 거래량 데이터를 한번에 계산하는 방식이라 에러가 발생한 것이다. 이에 따라 DB 업데이트를 위해서는 프로세스를 최대 2개밖에 사용하지 못하는 제약이 생김을 알게 되었다. (일봉, 기관투자자별 거래량 OPT이므로 2개)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;3. 최적화&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;(1) Pandas 최적화&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;아래 링크에서와 같이 vectorization, apply 함수 사용해서 DataFrame 최적화, DB 반영해주었다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://purplechip.tistory.com/44&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;2020/08/25 - [파이썬/이론] - [Python] pandas DataFrame 최적화 (삽입, 생성, 반복, 문자열)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;(2) GetCommDataEx 사용&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;메뉴얼을 보면 TR 조회 요청에 대해 데이터를 얻는 함수가 두 가지가 있다. GetCommData 와 GetCommDataEx 인데 후자의 함수는 차트 데이터를 대량으로 받는 경우만 사용이 가능하다. GetCommData가 따로 원하는 속성의 데이터를 함수의 parameter로 받아 그에 해당하는 값을 리턴한다면, GetCommDataEx는 한번에 모든 속성, 모든 Row에 대한 값을 리턴한다. 코드로 보면 다음과 같다.&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;13&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;14&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;15&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;16&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;17&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;18&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;19&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;20&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;21&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;22&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;23&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;24&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;_get_comm_data(&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;,&amp;nbsp;tr_code,&amp;nbsp;rq_name,&amp;nbsp;idx,&amp;nbsp;item):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;.GetCommData(tr_code,&amp;nbsp;rq_name,&amp;nbsp;idx,&amp;nbsp;item)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;return&lt;/span&gt;&amp;nbsp;data.strip()&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;_get_comm_data_ex(&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;,&amp;nbsp;tr_code,&amp;nbsp;rq_name):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;.GetCommDataEx(tr_code,&amp;nbsp;rq_name)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;return&lt;/span&gt;&amp;nbsp;data&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;GetCommData&amp;nbsp;사용&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;data&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;data_cnt&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;._get_repeat_cnt(tr_code,&amp;nbsp;rq_name)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;i&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(data_cnt):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;date&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;._get_comm_data(tr_code,&amp;nbsp;rq_name,&amp;nbsp;i,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;일자&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fore&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;._get_comm_data(tr_code,&amp;nbsp;rq_name,&amp;nbsp;i,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;외국인투자자&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;inst&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;._get_comm_data(tr_code,&amp;nbsp;rq_name,&amp;nbsp;i,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;기관계&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;indi&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;._get_comm_data(tr_code,&amp;nbsp;rq_name,&amp;nbsp;i,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;개인투자자&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;temp&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[date,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'1'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'2'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'3'&lt;/span&gt;,&amp;nbsp;indi,&amp;nbsp;fore,&amp;nbsp;inst]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data.append(temp)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;GetCommDataEx&amp;nbsp;사용&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;data&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;._get_comm_data_ex(tr_code,&amp;nbsp;rq_name)&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;보면 코드도 간단해질 뿐 아니라 속도도 월등하게 빠르다. 내 경우 삼성전자 모든 일봉 데이터 기준, 약 11,000 튜플 기준 5초 &amp;rarr; 3.5초로 시간 단축을 할 수 있었다. (물론 TR 조회 대기 시간까지 고려된 것이다.)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;최종적으로 초기 최적화 전 15.99초에서 5.76초로 단축되었다. 최적화의 힘을 다시 느낀다.&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>퀀트/구현</category>
      <category>OpenAPI+</category>
      <category>키움</category>
      <author>purplechip</author>
      <guid isPermaLink="true">https://purplechip.tistory.com/45</guid>
      <comments>https://purplechip.tistory.com/45#entry45comment</comments>
      <pubDate>Sat, 24 Oct 2020 23:34:43 +0900</pubDate>
    </item>
    <item>
      <title>2020 하반기 우리FIS 공채 역량평가 후기</title>
      <link>https://purplechip.tistory.com/54</link>
      <description>&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;우리FIS 역량평가는 코딩테스트, 인/적성, IT상식을 한번에 테스트하기 때문에 강행군이었다. 오전엔 인/적성을 봤고, 오후엔 특이한 방식이지만 코딩테스트/IT상식을 한번에 봤다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;1. 인/적성&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;인성평가는 생략한다. SKCT와 정말 비슷하게 나왔다. 언어, 수리/자료해석, 상황판단 영역이 나왔다. 시간은 못재봤지만 아마 각각 20문항 20분 / 20문항 20분 / 25문항 15분 이었을 것으로 추정된다. 이 &lt;a href=&quot;https://blog.naver.com/PostView.nhn?blogId=yankmo&amp;amp;logNo=221541925975&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;링크&lt;/a&gt;를 근거로 추정한 시간인데 동원 그룹 인적성에 대한 글이지만 문항과 유형이 같고 시간이 비슷한 느낌이 들었기 때문이다. 아마 난이도도 비슷할 것으로 예상된다. (한 기업에서 수주받아 문제 출제하는 거 같다)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;언어는 예상보다 짧은 지문의 문제가 많이 출제되었고 수리/자료해석의 경우 수리 문제의 비중이 절반 이상을 차지할 정도로 많다. SKCT와 정말 똑같은 느낌이다. 상황판단은 검색하면 자료가 많이 나올테니 참고하면 된다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;2. 코딩테스트/IT상식&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;프로그래머스에서 둘 다 진행되었다. IT상식은 객관식으로 프로그래머스 사이트에서 이런 형식도 지원하는 지는 처음 알았다. 어쨌든 20개 정도의 문제 중 SQL 위주의 문제가 매우 다수 출현했다. 시간은 2시간 30분을 주었고 IT 객관식 문제,&amp;nbsp; 4개의 코딩 문제가 주어지는데 특이한 점은 4개의 코딩 문제 중 3개에 3개 언어를 선택해서 각각 풀어야 한다. 언어는 C, Java, Python, SQL이 주어진다. 문제에 언어가 귀속된 형태는 아니다. 자기가 하고싶은 문제에 하고싶은 언어를 적용하면 된다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;SQL을 제외한 나머지는 일반 코딩테스트와 똑같고 난 SQL이 트리거나 프로시저를 짜는 형식일 줄 알았는데 단순히 질의문 생성이었다.. 앞으로의 SQL 테스트는 모두 쿼리라 생각하면 될 것 같다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>취업</category>
      <category>역량</category>
      <category>우리FIS</category>
      <category>우리에프아이에스</category>
      <category>필기</category>
      <author>purplechip</author>
      <guid isPermaLink="true">https://purplechip.tistory.com/54</guid>
      <comments>https://purplechip.tistory.com/54#entry54comment</comments>
      <pubDate>Wed, 21 Oct 2020 23:46:19 +0900</pubDate>
    </item>
    <item>
      <title>2020 하반기 금융결제원 공채 전산직 필기 후기</title>
      <link>https://purplechip.tistory.com/51</link>
      <description>&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;2021 금융결제원 전산직 필기시험을 보고 왔다. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;생각보다 문제는 쉬웠으나, 그것 이상으로 내가 모르는 것이 많다는 것을 느끼며 탈락을 예감하고 있다. 금융결제원 전산직 필기의 경우 인터넷에 정보가 매우 없다. 이 글에서나마 형식을 파악하고 참고하길 바란다. 물론 2021년도 신입직원 공채 기준이기 때문에 추후 변경될 여지는 다분하긴 하다. 금융결제원 홈페이지에서 안내하고 있는 내용은 다음과 같다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-origin-width=&quot;0&quot; data-origin-height=&quot;0&quot; data-ke-mobilestyle=&quot;widthContent&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/dFKmxp/btqLsbix5x3/7FA45UGMMBfTJbEYyvyXGk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/dFKmxp/btqLsbix5x3/7FA45UGMMBfTJbEYyvyXGk/img.png&quot; data-alt=&quot;[그림 1] 2021년도 금융결제원 신입사원 공개채용 필기전형 안내&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/dFKmxp/btqLsbix5x3/7FA45UGMMBfTJbEYyvyXGk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdFKmxp%2FbtqLsbix5x3%2F7FA45UGMMBfTJbEYyvyXGk%2Fimg.png&quot; data-origin-width=&quot;0&quot; data-origin-height=&quot;0&quot; data-ke-mobilestyle=&quot;widthContent&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;[그림 1] 2021년도 금융결제원 신입사원 공개채용 필기전형 안내&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;시간은 잘 기억이 안나는데 &lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;전산학 1시간 30분, &lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;직무역량평가 1시간&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;인 걸로 기억한다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;1. 전산학&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;객관식 50문제, 주관식 서술형 6문제 정도 출제된 것으로 기억한다. 문제는 전산학 전반을 다룬다. OS, 컴퓨터구조, SW설계, 보안 등 정보처리기사 정도 혹은 그 이상의 문제들이 출제되었다. C 관련 문제가 많이 나왔으므로 C의 기본적인 부분을 숙지하는 것이 좋아 보인다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;2. 직무역량평가&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;NCS 문제집 중 의사소통 영역에 해당하는 문제가 절반, 나머지 절반 중 1/5가 주사위나 입체도형 전개도, 1/5가 수열 파악, 3/5이 시사상식으로 기억한다. 의사소통 영역 문제는 NCS를 풀어본 사람은 알 것이다. 가령 유연근무제에 대한 개조식 글을 읽고 옳은 설명이나 틀린 설명을 찾는 문제이다. 하여튼 정보를 찾아내어 보기와 비교하는 문제라 생각하면 된다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;개인적으로 NCS를 풀어보면서 위와 같은 문제는 출제되지 않겠지란 안일한 생각을 가졌다가 당혹스러웠다. 아마 탈락이 확실하니 비우고 다른 걸 준비해야겠다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;에이 합격이 될까 싶었다. 그러나 그것이 실제로 일어났습니다.. 이에 대한 다음 포스팅은 아래 링크를 참고바란다.&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://purplechip.tistory.com/56&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;2020/11/12 - [취업] - 2020 하반기 금융결제원 공채 전산직 1차 면접 후기&lt;/a&gt;&lt;/p&gt;</description>
      <category>취업</category>
      <category>금결원</category>
      <category>금융결제원</category>
      <category>필기</category>
      <author>purplechip</author>
      <guid isPermaLink="true">https://purplechip.tistory.com/51</guid>
      <comments>https://purplechip.tistory.com/51#entry51comment</comments>
      <pubDate>Sat, 10 Oct 2020 20:09:49 +0900</pubDate>
    </item>
    <item>
      <title>Python DataFrame 최대 scalar 값의 index, column 구하기</title>
      <link>https://purplechip.tistory.com/47</link>
      <description>&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;pandas&lt;/code&gt;는 &lt;code&gt;idxmax()&lt;/code&gt;, &lt;code&gt;idxmin()&lt;/code&gt;이란 method를 제공한다. parameter &lt;code&gt;axis&lt;/code&gt;에 따라(column 혹은 row 기준에 따라) 최대값의 index, column &lt;code&gt;Series&lt;/code&gt;를 반환하는 기능을 가진다. 많이 사용하진 않겠지만 &lt;code&gt;DataFrame&lt;/code&gt;의 2차원 데이터 중 가장 큰 스칼라 값 하나의 index와 column이 궁금한 경우가 있다. 이는 간단하게 &lt;code&gt;idxmax()&lt;/code&gt;를 두 번 적용하는 것으로 해결할 수 있다. 아래 예제 코드를 보자.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;import&amp;nbsp;pandas&amp;nbsp;as&amp;nbsp;pd&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;import&amp;nbsp;numpy&amp;nbsp;as&amp;nbsp;np&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;df&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;pd.DataFrame(np.array([[&lt;span style=&quot;color: #0099cc;&quot;&gt;5&lt;/span&gt;,&lt;span style=&quot;color: #0099cc;&quot;&gt;2&lt;/span&gt;,&lt;span style=&quot;color: #0099cc;&quot;&gt;4&lt;/span&gt;],[&lt;span style=&quot;color: #0099cc;&quot;&gt;6&lt;/span&gt;,&lt;span style=&quot;color: #0099cc;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;color: #0099cc;&quot;&gt;5&lt;/span&gt;],[&lt;span style=&quot;color: #0099cc;&quot;&gt;7&lt;/span&gt;,&lt;span style=&quot;color: #0099cc;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;color: #0099cc;&quot;&gt;3&lt;/span&gt;]]),&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;columns&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;[&lt;span style=&quot;color: #63a35c;&quot;&gt;'a'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #63a35c;&quot;&gt;'b'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #63a35c;&quot;&gt;'c'&lt;/span&gt;])&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;df&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;a&amp;nbsp;&amp;nbsp;b&amp;nbsp;&amp;nbsp;c&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;0&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;5&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;2&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;4&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;1&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;6&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;1&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;2&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;7&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;1&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;3&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;idx&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;df.idxmax()&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;idx&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;dtype:&amp;nbsp;int64&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;sr&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;pd.Series([df.at[idx[i],&amp;nbsp;i]&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;for&lt;/span&gt;&amp;nbsp;i&amp;nbsp;in&amp;nbsp;idx.index],&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;index&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;idx.index)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;sr&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;7&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;dtype:&amp;nbsp;int64&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;idx_s&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;sr.idxmax()&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;idx_s&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #63a35c;&quot;&gt;'a'&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;print(f&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;max&amp;nbsp;:&amp;nbsp;df.at[{idx[idx_s]},&amp;nbsp;{idx_s}]&amp;nbsp;=&amp;nbsp;{sr[idx_s]}&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;max&amp;nbsp;:&amp;nbsp;df.at[&lt;span style=&quot;color: #0099cc;&quot;&gt;2&lt;/span&gt;,&amp;nbsp;a]&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;7&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #e5e5e5text-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;ol style=&quot;list-style-type: decimal;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;2차원의 &lt;code&gt;DataFrame&lt;/code&gt;에서 &lt;code&gt;idxmax()&lt;/code&gt; 메소드를 사용하여 각 column마다 가장 큰 값의 index를 얻는다. (변수명 &lt;code&gt;idx&lt;/code&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;이를 바탕으로 각 column마다 최대값을 가지는 &lt;code&gt;Series&lt;/code&gt;를 생성한다. (변수명 &lt;code&gt;sr&lt;/code&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;Series에서 &lt;code&gt;idxmax()&lt;/code&gt; 메소드를 사용하여 최대 column 값을 얻는다. (변수명 &lt;code&gt;idx_s&lt;/code&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;최대값의 column은 &lt;code&gt;idx_s&lt;/code&gt;이고 index는 &lt;code&gt;idx[idx_s]&lt;/code&gt;임을 알 수 있으므로 값까지 추출해낼 수 있다. &lt;code&gt;df.at[idx[idx_s], idx]&lt;/code&gt; 혹은 &lt;code&gt;sr[idx_s]&lt;/code&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;최소값의 column과 index를 구하는 방법 역시 &lt;code&gt;idxmin()&lt;/code&gt;을 사용하여 동일하게 구하면 된다.&lt;/span&gt;&lt;/p&gt;</description>
      <category>파이썬/이론</category>
      <category>Column</category>
      <category>DataFrame</category>
      <category>idxmax</category>
      <category>idxmin</category>
      <category>index</category>
      <category>Python</category>
      <category>scalar</category>
      <category>최대값</category>
      <category>파이썬</category>
      <author>purplechip</author>
      <guid isPermaLink="true">https://purplechip.tistory.com/47</guid>
      <comments>https://purplechip.tistory.com/47#entry47comment</comments>
      <pubDate>Mon, 31 Aug 2020 12:56:03 +0900</pubDate>
    </item>
    <item>
      <title>Python multiprocessing에서 logging 사용하기 (QueueHandler)</title>
      <link>https://purplechip.tistory.com/46</link>
      <description>&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;logging&lt;/code&gt;은 파이썬에서 자체적으로 제공하는 로그 패키지다. 여러가지 기능을 제공하므로 굳이 다른 패키지를 찾지 않더라도 유용하게 사용이 가능하지만 멀티프로세스 환경을 자체적으로 보장하지 못하는 문제를 가지고 있다. (멀티 쓰레드에서는 안전하게 동작한다.) logging Cookbook에서는 이러한 점을 언급하며 예제 코드를 제공하고 있으며 이를 참고하여 내가 사용할 클래스를 구현하였다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;QueueHandler&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;logging&lt;/code&gt; 패키지는 &lt;code&gt;QueueHandler&lt;/code&gt;를 제공한다. &lt;code&gt;QueueHandler&lt;/code&gt;란 말 그대로 &lt;code&gt;Queue&lt;/code&gt;에 logging 할 수 있게 구현된 &lt;code&gt;Handler&lt;/code&gt;다. 이 자체는 &lt;code&gt;FileHandler&lt;/code&gt;, &lt;code&gt;StreamHandler&lt;/code&gt;와 다르게 log 기록 시 파일이나 표준 출력에 기록되지 않고 &lt;code&gt;Queue&lt;/code&gt;에 출력이 저장된다. 그 후 위 &lt;code&gt;Handler&lt;/code&gt;에서 &lt;code&gt;Queue&lt;/code&gt;에 저장된 log를 꺼내 기록하는 과정으로 logging을 할 수 있다. 만약 multiprocess라면 여러 프로세스가 다중 생산자로 &lt;code&gt;Queue&lt;/code&gt;에 log 내역을 저장하고, 하나의 쓰레드 혹은 프로세스가 &lt;code&gt;Queue&lt;/code&gt;에서 log를 &lt;code&gt;get()&lt;/code&gt; 해서 기록하는 역할을 수행하는 것이다. 아래 그림은 구현된 Class를 도식화한 것이다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-origin-width=&quot;0&quot; data-origin-height=&quot;0&quot; data-ke-mobilestyle=&quot;widthContent&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/cYrkSh/btqHvAN3ITc/sKBgMks0rnEFewQ8nIN0w1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/cYrkSh/btqHvAN3ITc/sKBgMks0rnEFewQ8nIN0w1/img.png&quot; data-alt=&quot;[그림 1. QueueHandler logging 사용 구조]&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/cYrkSh/btqHvAN3ITc/sKBgMks0rnEFewQ8nIN0w1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcYrkSh%2FbtqHvAN3ITc%2FsKBgMks0rnEFewQ8nIN0w1%2Fimg.png&quot; data-origin-width=&quot;0&quot; data-origin-height=&quot;0&quot; data-ke-mobilestyle=&quot;widthContent&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;[그림 1. QueueHandler logging 사용 구조]&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;구현 코드&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;13&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;14&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;15&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;16&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;17&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;18&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;19&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;20&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;21&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;22&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;23&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;24&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;25&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;26&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;27&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;28&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;29&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;30&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;31&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;32&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;33&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;34&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;35&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;36&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;37&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;38&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;39&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;40&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;41&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;42&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;43&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;44&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;45&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;46&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;47&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;48&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;49&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;50&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;51&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;52&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;53&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;54&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;55&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;56&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;57&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;58&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;59&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;60&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;61&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;62&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;63&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;64&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;65&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;66&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;67&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;68&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;69&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;70&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;71&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;72&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;73&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;74&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;75&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;76&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;77&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;78&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;79&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;80&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;81&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;82&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;83&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;84&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;85&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;86&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;87&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;88&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;89&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;90&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;91&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;92&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;93&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;94&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;95&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;96&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;97&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;98&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;99&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;100&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;101&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;102&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;103&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;104&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;105&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;106&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;107&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;108&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;109&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;110&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;111&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;112&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;113&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;114&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;115&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;116&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;117&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;118&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;119&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;120&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;121&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;122&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;123&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;124&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;125&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;126&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;127&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;128&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;129&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;130&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;131&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;132&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;133&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;134&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;135&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;136&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;137&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;138&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;139&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;140&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;141&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;142&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;143&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;144&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;145&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;146&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;147&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;logging&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;logging.handlers&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;multiprocessing&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;from&lt;/span&gt;&amp;nbsp;threading&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;Thread&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;from&lt;/span&gt;&amp;nbsp;random&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;choice,&amp;nbsp;random&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;time&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;platform&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;'&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;Class&amp;nbsp;Log&amp;nbsp;performs&amp;nbsp;logger&amp;nbsp;configuration,&amp;nbsp;creation,&amp;nbsp;multiprocess&amp;nbsp;listener.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;'&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Log():&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;__init__(&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;.th&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;None&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;get_logger(&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;,&amp;nbsp;name):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;return&lt;/span&gt;&amp;nbsp;logging.getLogger(name)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;listener_start(&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;,&amp;nbsp;file_path,&amp;nbsp;name,&amp;nbsp;queue):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;.th&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;Thread(target&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;._proc_log_queue,&amp;nbsp;args&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;(file_path,&amp;nbsp;name,&amp;nbsp;queue))&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;.th.start()&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;listener_end(&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;,&amp;nbsp;queue):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;queue.put(&lt;span style=&quot;color: #4be6fa;&quot;&gt;None&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;.th.join()&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ffd500;&quot;&gt;'log&amp;nbsp;listener&amp;nbsp;end...'&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;_proc_log_queue(&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;,&amp;nbsp;file_path,&amp;nbsp;name,&amp;nbsp;queue):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;.config_log(file_path,&amp;nbsp;name)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;.get_logger(name)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;while&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;True&lt;/span&gt;:&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;try&lt;/span&gt;:&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;record&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;queue.get()&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;if&lt;/span&gt;&amp;nbsp;record&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;is&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;None&lt;/span&gt;:&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.handle(record)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;except&lt;/span&gt;&amp;nbsp;Exception:&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;sys,&amp;nbsp;traceback&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ffd500;&quot;&gt;'listener&amp;nbsp;problem'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;file&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;sys.stderr)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;traceback.print_exc(&lt;span style=&quot;color: #4be6fa;&quot;&gt;file&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;sys.stderr)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;config_queue_log(&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;,&amp;nbsp;queue,&amp;nbsp;name):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;'&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;you&amp;nbsp;use&amp;nbsp;multiprocess&amp;nbsp;logging,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;call&amp;nbsp;this&amp;nbsp;in&amp;nbsp;multiprocess&amp;nbsp;as&amp;nbsp;logging&amp;nbsp;producer.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logging&amp;nbsp;consumer&amp;nbsp;function&amp;nbsp;is&amp;nbsp;[self.listener_start]&amp;nbsp;and&amp;nbsp;[self.listener_end]&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;it&amp;nbsp;returns&amp;nbsp;logger&amp;nbsp;and&amp;nbsp;you&amp;nbsp;can&amp;nbsp;use&amp;nbsp;this&amp;nbsp;logger&amp;nbsp;to&amp;nbsp;log&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;qh&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;logging.handlers.QueueHandler(queue)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;logging.getLogger(name)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.setLevel(logging.DEBUG)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.addHandler(qh)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;return&lt;/span&gt;&amp;nbsp;logger&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;config_log(&lt;span style=&quot;color: #4be6fa;&quot;&gt;self&lt;/span&gt;,&amp;nbsp;file_path,&amp;nbsp;name):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;'&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;it&amp;nbsp;returns&amp;nbsp;FileHandler&amp;nbsp;and&amp;nbsp;StreamHandler&amp;nbsp;logger&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;you&amp;nbsp;do&amp;nbsp;not&amp;nbsp;need&amp;nbsp;to&amp;nbsp;use&amp;nbsp;multiprocess&amp;nbsp;logging,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;just&amp;nbsp;call&amp;nbsp;this&amp;nbsp;function&amp;nbsp;and&amp;nbsp;use&amp;nbsp;returned&amp;nbsp;logger.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;err&amp;nbsp;file&amp;nbsp;handler&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fh_err&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;logging.handlers.RotatingFileHandler(file_path&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;+&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'_error.log'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'a'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #c10aff;&quot;&gt;300&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #c10aff;&quot;&gt;10&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fh_err.setLevel(logging.WARNING)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;file&amp;nbsp;handler&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fh_dbg&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;logging.handlers.RotatingFileHandler(file_path&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;+&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'_debug.log'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'a'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #c10aff;&quot;&gt;300&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #c10aff;&quot;&gt;10&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fh_dbg.setLevel(logging.DEBUG)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;console&amp;nbsp;handler&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sh&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;logging.StreamHandler()&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sh.setLevel(logging.INFO)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;logging&amp;nbsp;format&amp;nbsp;setting&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ff&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;logging.Formatter(&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;'[%(asctime)s]&amp;nbsp;%(levelname)s&amp;nbsp;:&amp;nbsp;%(message)s'&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sf&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;logging.Formatter(&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;'[%(levelname)s]&amp;nbsp;%(message)s'&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fh_err.setFormatter(ff)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fh_dbg.setFormatter(ff)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sh.setFormatter(sf)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;if&lt;/span&gt;&amp;nbsp;platform.system()&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'Windows'&lt;/span&gt;:&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;msvcrt&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;win32api&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;win32con&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;win32api.SetHandleInformation(msvcrt.get_osfhandle(fh_dbg.stream.fileno()),&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;win32con.HANDLE_FLAG_INHERIT,&amp;nbsp;&lt;span style=&quot;color: #c10aff;&quot;&gt;0&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;win32api.SetHandleInformation(msvcrt.get_osfhandle(fh_err.stream.fileno()),&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;win32con.HANDLE_FLAG_INHERIT,&amp;nbsp;&lt;span style=&quot;color: #c10aff;&quot;&gt;0&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;create&amp;nbsp;logger,&amp;nbsp;assign&amp;nbsp;handler&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;logging.getLogger(name)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.setLevel(logging.DEBUG)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.addHandler(fh_err)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.addHandler(fh_dbg)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.addHandler(sh)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;return&lt;/span&gt;&amp;nbsp;logger&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;'&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;The&amp;nbsp;code&amp;nbsp;below&amp;nbsp;tests&amp;nbsp;the&amp;nbsp;multiprocess&amp;nbsp;logging.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;Main&amp;nbsp;process&amp;nbsp;and&amp;nbsp;child&amp;nbsp;process&amp;nbsp;produce&amp;nbsp;log&amp;nbsp;messasge.&amp;nbsp;(put&amp;nbsp;message&amp;nbsp;into&amp;nbsp;queue.)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;(random&amp;nbsp;choice&amp;nbsp;in&amp;nbsp;variable&amp;nbsp;LEVEL,&amp;nbsp;MESSAGES)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;Listener&amp;nbsp;process&amp;nbsp;produced&amp;nbsp;by&amp;nbsp;main&amp;nbsp;process&amp;nbsp;consume&amp;nbsp;log&amp;nbsp;message.&amp;nbsp;(write&amp;nbsp;log&amp;nbsp;message&amp;nbsp;in&amp;nbsp;stdout&amp;nbsp;and&amp;nbsp;file)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;'&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;LEVELS&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[logging.DEBUG,&amp;nbsp;logging.INFO,&amp;nbsp;logging.WARNING,&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logging.ERROR,&amp;nbsp;logging.CRITICAL]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;MESSAGES&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[&lt;span style=&quot;color: #ffd500;&quot;&gt;'Random&amp;nbsp;message&amp;nbsp;#1'&lt;/span&gt;,&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'Random&amp;nbsp;message&amp;nbsp;#2'&lt;/span&gt;,&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'Random&amp;nbsp;message&amp;nbsp;#3'&lt;/span&gt;,&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;worker(queue):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;multi&amp;nbsp;process&amp;nbsp;log&amp;nbsp;producer&amp;nbsp;start&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;Log().config_queue_log(queue,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'mp'&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;multiprocessing.current_process().name&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ffd500;&quot;&gt;'Worker&amp;nbsp;started:&amp;nbsp;%s'&lt;/span&gt;&amp;nbsp;%&amp;nbsp;name)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;i&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #c10aff;&quot;&gt;10&lt;/span&gt;):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;time.sleep(random())&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;level&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;choice(LEVELS)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;message&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;choice(MESSAGES)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.log(level,&amp;nbsp;f&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;{name}&amp;nbsp;-&amp;nbsp;{message}&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ffd500;&quot;&gt;'Worker&amp;nbsp;finished:&amp;nbsp;%s'&lt;/span&gt;&amp;nbsp;%&amp;nbsp;name)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;multi&amp;nbsp;process&amp;nbsp;log&amp;nbsp;producer&amp;nbsp;end&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;main():&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;queue&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;multiprocessing.Queue(&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #c10aff;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;listener&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;Log()&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;listener.listener_start(&lt;span style=&quot;color: #ffd500;&quot;&gt;'test'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'listener'&lt;/span&gt;,&amp;nbsp;queue)&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;log&amp;nbsp;consumer&amp;nbsp;thread&amp;nbsp;start&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;workers&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;i&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #c10aff;&quot;&gt;10&lt;/span&gt;):&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;multiprocess&amp;nbsp;loop&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;multiprocessing.Process(target&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;worker,&amp;nbsp;args&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;(queue,))&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;workers.append(w)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.start()&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;main&amp;nbsp;process&amp;nbsp;log&amp;nbsp;producer&amp;nbsp;start&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;Log().config_queue_log(queue,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'mp'&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;multiprocessing.current_process().name&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ffd500;&quot;&gt;'Worker&amp;nbsp;started:&amp;nbsp;%s'&lt;/span&gt;&amp;nbsp;%&amp;nbsp;name)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;i&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #c10aff;&quot;&gt;10&lt;/span&gt;):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;time.sleep(random())&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;level&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;choice(LEVELS)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;message&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;choice(MESSAGES)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.log(level,&amp;nbsp;f&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;{name}&amp;nbsp;-&amp;nbsp;{message}&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ffd500;&quot;&gt;'Worker&amp;nbsp;finished:&amp;nbsp;%s'&lt;/span&gt;&amp;nbsp;%&amp;nbsp;name)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;main&amp;nbsp;process&amp;nbsp;log&amp;nbsp;producer&amp;nbsp;end&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;w&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;workers:&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.join()&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;listener.listener_end(queue)&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;#&amp;nbsp;log&amp;nbsp;consumer&amp;nbsp;thread&amp;nbsp;end&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;if&lt;/span&gt;&amp;nbsp;__name__&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'__main__'&lt;/span&gt;:&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;main()&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #4f4f4ftext-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;b&gt;line 18 - 39&lt;/b&gt; : &lt;code&gt;listener_start()&lt;/code&gt; 함수는 &lt;code&gt;_proc_log_queue()&lt;/code&gt; 를 &lt;code&gt;Thread&lt;/code&gt;로 실행시킨다. &lt;code&gt;_proc_log_queue&lt;/code&gt; 는 &lt;code&gt;Queue&lt;/code&gt;에서 log data를 &lt;code&gt;get()&lt;/code&gt;하고 &lt;code&gt;logger.handle()&lt;/code&gt;을 통해 기록하는 동작을 계속 반복한다. &lt;code&gt;Queue.get()&lt;/code&gt; 함수는 &lt;code&gt;timeout&lt;/code&gt; parameter가 없을 경우 &lt;code&gt;Queue&lt;/code&gt;에 데이터가 없으면 블록된다(waiting 상태).&amp;nbsp; &lt;code&gt;get()&lt;/code&gt;한 데이터가 &lt;code&gt;None&lt;/code&gt;인 경우 종료된다. 종료는&lt;code&gt; Queue&lt;/code&gt;에 &lt;code&gt;None&lt;/code&gt; 데이터를 삽입하는 &lt;code&gt;listener_end()&lt;/code&gt; 함수를 통해 이루어진다.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;b&gt;line 41 - 52&lt;/b&gt; : &lt;code&gt;QueueHandler&lt;/code&gt;를 할당받은 &lt;code&gt;logger&lt;/code&gt;를 선언하고 반환한다.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;b&gt;line 54 - 90&lt;/b&gt; : &lt;code&gt;FileHandler&lt;/code&gt;와 &lt;code&gt;StreamHandler&lt;/code&gt;를 할당받은 &lt;code&gt;logger&lt;/code&gt;를 선언하고 반환한다. 만약 &lt;code&gt;multiprocessing&lt;/code&gt;을 사용하지 않는다면 이 &lt;code&gt;logger&lt;/code&gt;만 사용하여 log를 수행할 수 있다.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;b&gt;line 75 - 82&lt;/b&gt; : 위 코드에서는 &lt;code&gt;config_log()&lt;/code&gt;가 &lt;code&gt;_proc_log_queue()&lt;/code&gt;에서만 사용된다. 하지만 단일 프로세스를 사용하면서 &lt;code&gt;config_log()&lt;/code&gt;를 사용하다가 &lt;code&gt;multiprocessing&lt;/code&gt;을 사용하며 &lt;code&gt;listener_start()&lt;/code&gt;를 호출해 &lt;code&gt;_proc_log_queue()&lt;/code&gt;가 호출된다면 단일 프로세스와 &lt;code&gt;listener_start()&lt;/code&gt;를 사용한 쓰레드(코드에서는 &lt;code&gt;Thread()&lt;/code&gt;지만 &lt;code&gt;Process()&lt;/code&gt;로 사용할 수도 있다.)가 동일한 log file을 참조하게 된다. 이에 따라 &lt;code&gt;Handler&lt;/code&gt;가 log file의 이름을 자동적으로 바꿔줄 때 윈도우 운영체제를 사용할 경우 에러가 발생하는데 이에 대한 참조를 허용하는 코드이다.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;b&gt;line 91 -&lt;/b&gt; : logging level과 message를 무작위로 선택하여 로그를 기록하는 코드다. 10개의 child process와 main process에서 &lt;code&gt;QueueHandler&lt;/code&gt;로 &lt;code&gt;Queue&lt;/code&gt;에 log를 기록하고 &lt;code&gt;listener.start()&lt;/code&gt;를 통해 &lt;code&gt;Queue&lt;/code&gt;에서 log 내역을 받아 file 및 stdout 출력을 하는 Thread를 생성한다.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;logging&lt;/code&gt; 패키지를 사용하며 굳이 &lt;code&gt;logger&lt;/code&gt;의 이름을 정의할 필요가 있을까란 의문을 잠깐 했었다. &lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;logging&lt;/code&gt; 패키지는 한 번 &lt;code&gt;logger&lt;/code&gt;의 name을 할당하여 생성되면 메모리 공간에 남아 프로세스 내에서 언제든 호출할 경우 같은 &lt;code&gt;logger&lt;/code&gt;를 획득하게 된다. 따라서&lt;/span&gt; 실제로 &lt;code&gt;logging&lt;/code&gt; 패키지를 사용하면서 다양한 &lt;code&gt;Handler&lt;/code&gt;나 다양한 조건에 따른 log 출력을 원할 경우 각기 다른 &lt;code&gt;logger&lt;/code&gt; 설정이 필요하므로 name을 통해 &lt;code&gt;logger&lt;/code&gt;를 쉽게 할당받는 방법은 아주 효율적이라 생각한다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;참고&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;logging Cookbook&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;a href=&quot;https://docs.python.org/ko/3/howto/logging-cookbook.html&quot;&gt;https://docs.python.org/ko/3/howto/logging-cookbook.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>파이썬/이론</category>
      <category>Logging</category>
      <category>multiprocessing</category>
      <category>Python</category>
      <category>QueueHandler</category>
      <category>파이썬</category>
      <author>purplechip</author>
      <guid isPermaLink="true">https://purplechip.tistory.com/46</guid>
      <comments>https://purplechip.tistory.com/46#entry46comment</comments>
      <pubDate>Sun, 30 Aug 2020 23:42:05 +0900</pubDate>
    </item>
    <item>
      <title>[Python] pandas DataFrame 최적화 (삽입, 생성, 반복, 문자열)</title>
      <link>https://purplechip.tistory.com/44</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;pandas DataFrame&lt;/code&gt;은 데이터 분석에 있어 매우 강력한 도구이다. 그러나 그만큼 올바른 사용법이 필요하고 잘못된 사용법을 적용할 경우 매우 답답한 프로그램을 경험하게 된다. 그만큼 &lt;code&gt;DataFrame&lt;/code&gt; 최적화는 프로그램의 효율성을 위해 어느정도 필요하다. 이번 포스팅에서는 &lt;code&gt;pandas DataFrame&lt;/code&gt;을 최적화하는 방법을 알아본다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;반복 최적화&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;DataFrame&lt;/code&gt;에서 row 값을 사용한 어떤 수행을 반복한다고 하자. 이 때 고려해야 할 순서는 다음과 같다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;ol style=&quot;list-style-type: decimal;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;벡터화 (vectorization)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;pandas apply&lt;/code&gt; 사용 (Cython에서 실행)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;itertuples()&lt;/code&gt; 사용&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;index&lt;/code&gt; 사용(속도 &lt;code&gt;df.at()&lt;/code&gt; &amp;gt; &lt;code&gt;df.loc()&lt;/code&gt;)&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;iterrows()&lt;/code&gt; 사용&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;len&lt;/code&gt; 단순 반복&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;이에 대한 자세한 설명은 &lt;a href=&quot;https://aldente0630.github.io/data-science/2018/08/05/a-beginners-guide-to-optimizing-pandas-code-for-speed.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&quot;판다스 코드 속도 최적화를 위한 초보자 안내서&quot;&lt;/a&gt;에서 자세히 소개한다. 그렇다면 '대체 왜 &lt;code&gt;pandas&lt;/code&gt; 최적화를 사용하는 것이 속도 절감이 되는 것일까?' 하는 의문을 갖지 않을 수 없다. 그 이유는 3가지 정도로 압축할 수 있는데 파이썬 자료구조의 런타임 오버헤드 제거, C 배열 캐싱, SIMD이다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;파이썬은 동적으로 프로그램이 실행되는 인터프리터 언어이기 때문에 파이썬 내 &lt;code&gt;list&lt;/code&gt; 등 배열의 각 요소에 대해 참조 시 런타임 오버헤드가 있다. 가령 &lt;code&gt;list&lt;/code&gt;의 경우 슬라이싱 등을 판단해야 하기 때문에 인덱스에 들어가는 값을 decode 해야한다. 하지만 &lt;code&gt;pandas&lt;/code&gt;는 C언어 array 기반이기 때문에 처음 참조 시만 오버헤드가 생기며 이 차이는 큰 차이를 만들어낸다. 반복의 모든 부분에서 오버헤드가 생기는 것과 반복이 시작될 때만 오버헤드가 발생하는 것을 고려하면 2n과 n의 차이만큼 속도 변화가 있음을 알 수 있다. 또한 C array라는 차이가 또 다른 부분에서 적용이 된다. 캐시 활용 측면에서도 C array를 반복하는 것이 캐시 친화적이다. (물론 &lt;code&gt;DataFrame&lt;/code&gt;을 각 요소에 대해 참조 시간이 부여될 수 있도록 코딩할 수 있다. 이런 코딩 방식은 &lt;code&gt;DataFrame&lt;/code&gt;을 사용할 때 반드시 지양해야 한다.)&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;추가적으로 SIMD 명령어를 통해 벡터화가 가능하다. SIMD란 Single Instruction Multiple Data의 약자로 하나의 CPU 명령어로 다수의 데이터를 한번에 처리하는 방식을 의미한다. 아래 그림이 SIMD를 도식화한 것이다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-origin-width=&quot;220&quot; data-origin-height=&quot;220&quot; width=&quot;267&quot; height=&quot;NaN&quot; data-ke-mobilestyle=&quot;widthContent&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/oEuaM/btqHbZ7cbTK/kZpo5kufe9CvEqudBhuRC1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/oEuaM/btqHbZ7cbTK/kZpo5kufe9CvEqudBhuRC1/img.png&quot; data-alt=&quot;[그림 1. SIMD 동작구조 (출처 : Wikipedia)]&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/oEuaM/btqHbZ7cbTK/kZpo5kufe9CvEqudBhuRC1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FoEuaM%2FbtqHbZ7cbTK%2FkZpo5kufe9CvEqudBhuRC1%2Fimg.png&quot; data-origin-width=&quot;220&quot; data-origin-height=&quot;220&quot; width=&quot;267&quot; height=&quot;NaN&quot; data-ke-mobilestyle=&quot;widthContent&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;[그림 1. SIMD 동작구조 (출처 : Wikipedia)]&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;쉽게 C array 배열이 있다고 보면 그 배열 자체를 한꺼번에 계산한다고 생각하면 된다. 이렇게 되면 &lt;code&gt;DataFrame&lt;/code&gt; 내 row 갯수만큼 명령어가 반복실행되는 것이 크게 한 번의 명령어 실행으로 해결되는 것이다. 당연히 속도면에서 큰 체감이 생길 수 밖에 없다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;문자열 최적화&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;C array가 문자열 함수에도 적용이 될까 싶은 의문이 있는데 &lt;code&gt;pandas&lt;/code&gt;에서는 그 고민을 말끔히 날려준다. &lt;code&gt;Series&lt;/code&gt; 자료구조는 &lt;code&gt;str()&lt;/code&gt; 이라는 문자열 벡터화 함수를 제공한다. 이에 대한 내용은 &lt;a href=&quot;https://pandas.pydata.org/pandas-docs/stable/user_guide/text.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;pandas document&lt;/a&gt;에서 자세히 확인 가능하다. regular expression 사용도 가능하며 다재다능한 여러 기능을 가지고 있다. &lt;span style=&quot;color: #000000;&quot;&gt;위 링크 글에서는 실수 연산을 예로 들고 있으므로 &lt;/span&gt;한번 위에 제시된 여러 반복 처리 방식을 문자열 column에 적용하여 속도 측정을 해보자. 코드는 다음과 같다.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;13&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;14&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;15&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;16&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;17&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;18&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;19&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;20&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;21&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;22&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;23&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;24&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;25&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;26&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;27&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;28&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;29&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;30&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;31&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;32&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;33&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;34&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;35&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;36&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;37&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;38&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;39&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;40&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;41&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;42&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;43&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;44&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;45&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;46&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;47&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;48&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;49&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;50&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;51&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;52&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;53&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;54&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;55&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;56&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;57&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;58&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;59&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;60&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;61&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;62&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;63&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;64&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;from&lt;/span&gt;&amp;nbsp;pandas&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;DataFrame&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;pandas&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;re&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;string&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;random&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;alphabet&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;string.ascii_uppercase&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;def&lt;/span&gt;&amp;nbsp;str_cat(s1,&amp;nbsp;s2):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s1&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;s1.replace(&lt;span style=&quot;color: #ffd500;&quot;&gt;'-'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;return&lt;/span&gt;&amp;nbsp;s1.join(s2)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;list1&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[random.choice(alphabet)&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;+&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'-'&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;_&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #c10aff;&quot;&gt;100000&lt;/span&gt;)]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;list2&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[random.choice(alphabet)&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;_&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #c10aff;&quot;&gt;100000&lt;/span&gt;)]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;df&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;DataFrame(zip(list1,&amp;nbsp;list2),&amp;nbsp;columns&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s1'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'s2'&lt;/span&gt;])&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;##&amp;nbsp;len을&amp;nbsp;이용한&amp;nbsp;반복&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;%%timeit&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;s3_list&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;idx&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #4be6fa;&quot;&gt;len&lt;/span&gt;(df)):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s3&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;str_cat(df.iloc[idx][&lt;span style=&quot;color: #ffd500;&quot;&gt;'s1'&lt;/span&gt;],&amp;nbsp;df.iloc[idx][&lt;span style=&quot;color: #ffd500;&quot;&gt;'s2'&lt;/span&gt;])&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s3_list.append(s3)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;df[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s3'&lt;/span&gt;]&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;s3_list&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;##&amp;nbsp;iterrow을&amp;nbsp;이용한&amp;nbsp;반복&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;%%timeit&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;s3_list&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;idx,&amp;nbsp;row&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;df.iterrows():&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s3&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;str_cat(row[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s1'&lt;/span&gt;],&amp;nbsp;row[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s2'&lt;/span&gt;])&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s3_list.append(s3)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;df[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s3'&lt;/span&gt;]&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;s3_list&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;##&amp;nbsp;index&amp;nbsp;loc를&amp;nbsp;이용한&amp;nbsp;반복&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;%%timeit&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;s3_list&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;idx&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;df.index:&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s3&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;str_cat(df.loc[idx,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'s1'&lt;/span&gt;],&amp;nbsp;df.loc[idx,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'s2'&lt;/span&gt;])&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s3_list.append(s3)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;df[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s3'&lt;/span&gt;]&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;s3_list&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;##&amp;nbsp;index&amp;nbsp;at를&amp;nbsp;이용한&amp;nbsp;반복&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;%%timeit&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;s3_list&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;idx&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;df.index:&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s3&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;str_cat(df.at[idx,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'s1'&lt;/span&gt;],&amp;nbsp;df.at[idx,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'s2'&lt;/span&gt;])&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s3_list.append(s3)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;df[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s3'&lt;/span&gt;]&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;s3_list&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;##&amp;nbsp;itertuple을&amp;nbsp;이용한&amp;nbsp;반복&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;%%timeit&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;s3_list&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;row&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;df.itertuples():&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s3&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;str_cat(getattr(row,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'s1'&lt;/span&gt;),&amp;nbsp;getattr(row,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'s2'&lt;/span&gt;))&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s3_list.append(s3)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;df[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s3'&lt;/span&gt;]&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;s3_list&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;##&amp;nbsp;apply&amp;nbsp;함수&amp;nbsp;사용&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;%%timeit&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;df[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s3'&lt;/span&gt;]&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;df.apply(lambda&amp;nbsp;row:&amp;nbsp;str_cat(row[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s1'&lt;/span&gt;],&amp;nbsp;row[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s2'&lt;/span&gt;]),&amp;nbsp;axis&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #c10aff;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;##&amp;nbsp;str&amp;nbsp;함수&amp;nbsp;사용&amp;nbsp;(벡터화)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;%%timeit&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;df[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s3'&lt;/span&gt;]&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;df[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s1'&lt;/span&gt;].&lt;span style=&quot;color: #4be6fa;&quot;&gt;str&lt;/span&gt;.replace(&lt;span style=&quot;color: #ffd500;&quot;&gt;'-'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;''&lt;/span&gt;).&lt;span style=&quot;color: #4be6fa;&quot;&gt;str&lt;/span&gt;.cat(df[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s2'&lt;/span&gt;])&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;위 코드는 &lt;code&gt;'s1'&lt;/code&gt;에서 &lt;code&gt;'-'&lt;/code&gt;를 제거한 후 &lt;code&gt;'s2'&lt;/code&gt;를 &lt;code&gt;cat&lt;/code&gt;한 결과를 &lt;code&gt;'s3'&lt;/code&gt;에 할당하는 코드들이다. &lt;code&gt;df&lt;/code&gt; 를 출력하면 다음과 같다.&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;df&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s1&amp;nbsp;s2&amp;nbsp;&amp;nbsp;s3&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;0&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;D&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;-&lt;/span&gt;&amp;nbsp;&amp;nbsp;M&amp;nbsp;&amp;nbsp;DM&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;1&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Q&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;-&lt;/span&gt;&amp;nbsp;&amp;nbsp;J&amp;nbsp;&amp;nbsp;QJ&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;2&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;P&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;-&lt;/span&gt;&amp;nbsp;&amp;nbsp;V&amp;nbsp;&amp;nbsp;PV&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;3&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;G&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;-&lt;/span&gt;&amp;nbsp;&amp;nbsp;K&amp;nbsp;&amp;nbsp;GK&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;4&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;V&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;-&lt;/span&gt;&amp;nbsp;&amp;nbsp;U&amp;nbsp;&amp;nbsp;VU&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;..&amp;nbsp;..&amp;nbsp;&amp;nbsp;..&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;99995&lt;/span&gt;&amp;nbsp;&amp;nbsp;B&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;-&lt;/span&gt;&amp;nbsp;&amp;nbsp;C&amp;nbsp;&amp;nbsp;BC&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;99996&lt;/span&gt;&amp;nbsp;&amp;nbsp;C&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;-&lt;/span&gt;&amp;nbsp;&amp;nbsp;L&amp;nbsp;&amp;nbsp;CL&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;99997&lt;/span&gt;&amp;nbsp;&amp;nbsp;I&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;-&lt;/span&gt;&amp;nbsp;&amp;nbsp;K&amp;nbsp;&amp;nbsp;IK&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;99998&lt;/span&gt;&amp;nbsp;&amp;nbsp;A&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;-&lt;/span&gt;&amp;nbsp;&amp;nbsp;T&amp;nbsp;&amp;nbsp;AT&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;99999&lt;/span&gt;&amp;nbsp;&amp;nbsp;B&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;-&lt;/span&gt;&amp;nbsp;&amp;nbsp;D&amp;nbsp;&amp;nbsp;BD&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;[&lt;span style=&quot;color: #0099cc;&quot;&gt;100000&lt;/span&gt;&amp;nbsp;rows&amp;nbsp;x&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;3&lt;/span&gt;&amp;nbsp;columns]&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;코드 설명을 하면 &lt;code&gt;%%timeit&lt;/code&gt; 은 ipython(jupyter, spyder 등)에서 셀의 실행 시간을 측정해주는 기능이다. 또한 &lt;code&gt;df.loc&lt;/code&gt; 함수를 &lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;df.loc[idx][col]&lt;/code&gt;, &lt;code&gt;df.loc[idx, col]&lt;/code&gt; 두 가지로 표현할 수 있는데 후자가 속도가 월등히 빠른 대비 전자는 &lt;code&gt;len&lt;/code&gt; 사용과 비슷한 수준임을 확인했다. 전자는 두 번 참조라면 후자는 한 번에 위치를 정해주기 때문으로 추측한다. 그리고 &lt;code&gt;df.loc&lt;/code&gt;이 슬라이싱 기능까지 있는거에 비해 &lt;code&gt;df.at&lt;/code&gt;은 scalar 참조만 가능하므로 속도가 훨씬 빠르다. 요소만 참조하는 코드라면 &lt;code&gt;df.at&lt;/code&gt;을 사용하는 것이 효율적이다. &lt;/span&gt;결과를 정리하면 아래와 같다.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%;&quot; border=&quot;1&quot; data-ke-style=&quot;style8&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 33.3333%; text-align: center;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;방식&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 33.3333%; text-align: center;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;소요시간&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 33.3333%; text-align: center;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;직전 대비 증가율&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 33.3333%;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;len 단순 반복&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;iterrows() 사용&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;apply 함수&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;index loc 사용&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;index at 사용&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;itertuples() 사용&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;벡터화 (str 함수)&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 33.3333%;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;13.2&amp;nbsp;s&amp;nbsp;&amp;plusmn;&amp;nbsp;85.8&amp;nbsp;ms&amp;nbsp;per&amp;nbsp;loop&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;7.19&amp;nbsp;s&amp;nbsp;&amp;plusmn;&amp;nbsp;43.8&amp;nbsp;ms&amp;nbsp;per&amp;nbsp;loop&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;1.98&amp;nbsp;s&amp;nbsp;&amp;plusmn;&amp;nbsp;45.5&amp;nbsp;ms&amp;nbsp;per&amp;nbsp;loop &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;1.22&amp;nbsp;s&amp;nbsp;&amp;plusmn;&amp;nbsp;38.2&amp;nbsp;ms&amp;nbsp;per&amp;nbsp;loop&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;754&amp;nbsp;ms&amp;nbsp;&amp;plusmn;&amp;nbsp;34&amp;nbsp;ms&amp;nbsp;per&amp;nbsp;loop&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;103 ms &amp;plusmn; 1.25 ms per loop &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;48.8&amp;nbsp;ms&amp;nbsp;&amp;plusmn;&amp;nbsp;672&amp;nbsp;&amp;micro;s&amp;nbsp;per&amp;nbsp;loop&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 33.3333%;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;1.84x&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;3.63x&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;1.62x&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;1.61x&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;7.32x&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;2.11x&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;결과에서 &lt;code&gt;apply&lt;/code&gt; 함수를 사용한 경우가 &lt;code&gt;index&lt;/code&gt;, &lt;code&gt;itertuples()&lt;/code&gt;를 사용한 경우보다 느렸는데 이는 문자열을 다루다보니 &lt;code&gt;apply&lt;/code&gt; 가 Cython에서 동작하지 않은 것으로 추측된다. 최고 속도와 최저 속도는 약 270배가 차이난다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;삽입, 생성 최적화&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;DataFrame&lt;/code&gt;이 C array 기반이라는 사실을 알면 삽입, 생성에서 어떤 것이 더 빠른 속도를 가지는 것일지 예상이 갈 것이다. 결론부터 말하면 삽입보단 생성이 빠르다. 반복문을 통해 계속 배열 사이즈를 늘려가며 삽입하는 것보다 애초부터 큰 메모리 할당을 받아 생성하는 것이 C array 기준에서 빠를 수 밖에 없다. 이것 역시 코드를 직접 실행하면서 결과를 확인해보자. 비교 대상은 총 4개로 (1) &lt;code&gt;append&lt;/code&gt;, (2) &lt;code&gt;loc&lt;/code&gt;, (3) 미리 할당된 &lt;code&gt;loc&lt;/code&gt;, (4) &lt;code&gt;DataFrame&lt;/code&gt; 생성이다.&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;13&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;14&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;15&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;16&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;17&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;18&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;19&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;20&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;21&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;22&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;23&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;24&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;25&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;26&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;27&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;28&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;29&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;30&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;from&lt;/span&gt;&amp;nbsp;pandas&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;DataFrame&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;string&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;random&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;alphabet&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;string.ascii_uppercase&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;##&amp;nbsp;append&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;%%timeit&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;df&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;DataFrame(columns&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s1'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'s2'&lt;/span&gt;])&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;i&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #c10aff;&quot;&gt;1000&lt;/span&gt;):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;df.append([random.choice(alphabet),&amp;nbsp;random.choice(alphabet)])&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;##&amp;nbsp;loc&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;%%timeit&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;df&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;DataFrame(columns&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s1'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'s2'&lt;/span&gt;])&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;i&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #c10aff;&quot;&gt;1000&lt;/span&gt;):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;df.loc[i]&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[random.choice(alphabet),&amp;nbsp;random.choice(alphabet)]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;##&amp;nbsp;정의된&amp;nbsp;loc&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;%%timeit&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;index&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[i&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;i&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #c10aff;&quot;&gt;1000&lt;/span&gt;)]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;df&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;DataFrame(columns&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s1'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'s2'&lt;/span&gt;],&amp;nbsp;index&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;index)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;i&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;index:&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;df.loc[i]&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[random.choice(alphabet),&amp;nbsp;random.choice(alphabet)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;##&amp;nbsp;DataFrame&amp;nbsp;생성&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;%%timeit&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;index&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[i&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;i&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #c10aff;&quot;&gt;1000&lt;/span&gt;)]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;list1&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;[[random.choice(alphabet),&amp;nbsp;random.choice(alphabet)]&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;_&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #c10aff;&quot;&gt;1000&lt;/span&gt;)]&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;df&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;DataFrame(list1,&amp;nbsp;columns&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;[&lt;span style=&quot;color: #ffd500;&quot;&gt;'s1'&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;'s2'&lt;/span&gt;],&amp;nbsp;index&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;index)&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;원래 십만 번을 하려고 했지만 엄청 느릴 것 같아서 천 번만 반복시키기로 했다. 결과는 아래와 같다.&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%;&quot; border=&quot;1&quot; data-ke-style=&quot;style8&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 33.3333%;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;방식&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 33.3333%;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;소요시간&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 33.3333%;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;직전 대비 증가율&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;width: 33.3333%;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;loc()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;append()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;정의된 loc()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;DataFrame 생성&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 33.3333%;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;1.63&amp;nbsp;s&amp;nbsp;&amp;plusmn;&amp;nbsp;23.7&amp;nbsp;ms&amp;nbsp;per&amp;nbsp;loop &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;1.26&amp;nbsp;s&amp;nbsp;&amp;plusmn;&amp;nbsp;26.2&amp;nbsp;ms&amp;nbsp;per&amp;nbsp;loop &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;83.9&amp;nbsp;ms&amp;nbsp;&amp;plusmn;&amp;nbsp;1.31&amp;nbsp;ms&amp;nbsp;per&amp;nbsp;loop &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;1.69&amp;nbsp;ms&amp;nbsp;&amp;plusmn;&amp;nbsp;20.9&amp;nbsp;&amp;micro;s&amp;nbsp;per&amp;nbsp;loop&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;width: 33.3333%;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;1.29x&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;15x&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;49.6x&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;엄청난 차이를 확인할 수 있다. 제일 빠른 방식과 느린 방식은 약 960배의 차이를 보인다. 작은 데이터는 상관없지만 큰 데이터를 &lt;code&gt;DataFrame&lt;/code&gt;으로 만들 때 반드시 생성하는 것을 추천한다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;마치며&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;pandas&lt;/code&gt;는 정말 강력한 도구이지만, 잘못 사용할 경우 굼벵이같은 속도를 경험할 것이다. 코드 가독성 면으로나, 효율적인 면으로 보나 벡터화는 필수이다.&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;참고&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;DataFrame 반복 최적화&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;a href=&quot;https://aldente0630.github.io/data-science/2018/08/05/a-beginners-guide-to-optimizing-pandas-code-for-speed.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;aldente0630.github.io/data-science/2018/08/05/a-beginners-guide-to-optimizing-pandas-code-for-speed.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;DataFrame 반복 최적화 (2)&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;a href=&quot;https://www.it-swarm.dev/ko/python/pandas-iterrows%EC%97%90-%EC%84%B1%EB%8A%A5-%EB%AC%B8%EC%A0%9C%EA%B0%80-%EC%9E%88%EC%8A%B5%EB%8B%88%EA%B9%8C/1048592965/&quot;&gt;www.it-swarm.dev/ko/python/pandas-iterrows%EC%97%90-%EC%84%B1%EB%8A%A5-%EB%AC%B8%EC%A0%9C%EA%B0%80-%EC%9E%88%EC%8A%B5%EB%8B%88%EA%B9%8C/1048592965/&lt;/a&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;DataFrame append, loc, iloc, 생성 속도 비교&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;a href=&quot;https://stackoverflow.com/questions/10715965/add-one-row-to-pandas-dataframe/10716007#comment101375152_47979665&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;stackoverflow.com/questions/10715965/add-one-row-to-pandas-dataframe/10716007#comment101375152_47979665&lt;/a&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;Pandas 최적화에 대한 이해&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;a href=&quot;https://towardsdatascience.com/understanding-the-need-for-optimization-when-using-pandas-8ce23b83330c&quot;&gt;https://towardsdatascience.com/understanding-the-need-for-optimization-when-using-pandas-8ce23b83330c&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;Pandas str document&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;a href=&quot;https://pandas.pydata.org/pandas-docs/stable/user_guide/text.html&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;pandas.pydata.org/pandas-docs/stable/user_guide/text.html&lt;/a&gt;&lt;/p&gt;</description>
      <category>파이썬/이론</category>
      <category>DataFrame</category>
      <category>pandas</category>
      <category>Python</category>
      <category>vector</category>
      <category>벡터</category>
      <category>최적화</category>
      <author>purplechip</author>
      <guid isPermaLink="true">https://purplechip.tistory.com/44</guid>
      <comments>https://purplechip.tistory.com/44#entry44comment</comments>
      <pubDate>Tue, 25 Aug 2020 01:27:04 +0900</pubDate>
    </item>
    <item>
      <title>[Python] tqdm을 사용하여 for 반복, 함수 진행률 출력하기</title>
      <link>https://purplechip.tistory.com/43</link>
      <description>&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;실행 시간이 긴 프로그램의 경우 간혹 어느 정도 진행되었는지 확인할 필요가 있다. 물론 &lt;code&gt;print()&lt;/code&gt;와 carriage return &lt;code&gt;\r&lt;/code&gt; 을 사용해서 직접 구현할 수 있지만 계속 출력되는 line이 지저분해 보이기도 하고 매번 직접 구현한 것을 옮겨 사용하기도 애매하다. python에서는 &lt;code&gt;tqdm&lt;/code&gt; 이라는 모듈을 사용하여 프로그램의 진행 상황을 깔끔하게 출력할 수 있다. &lt;code&gt;ProgressBar&lt;/code&gt;라는 또 다른 모듈이 있긴 하지만 개발이 몇 년 전부터 이루어지지 않고 있으며 속도는 800ns/iter로 &lt;code&gt;tqdm&lt;/code&gt;의 60ns/iter보다 느린 속도를 가진다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;tqdm&lt;/code&gt; 모듈에서 &lt;code&gt;tqdm&lt;/code&gt; 클래스를 사용하며 parameter는 다음과 같다.&lt;/span&gt;&lt;/p&gt;
&lt;blockquote data-ke-style=&quot;style2&quot;&gt;&lt;i&gt;&lt;b&gt;class tqdm():&lt;/b&gt; &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&quot;&quot;&quot; Decorate an iterable object, returning an iterator which acts exactly like the original iterable, but prints a dynamically updating progressbar every time a value is requested. &quot;&quot;&quot; &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;def __init__&lt;/b&gt;(self, iterable=None, desc=None, total=None, leave=True, file=None, ncols=None, mininterval=0.1, &lt;/i&gt;&lt;i&gt;maxinterval=10.0, miniters=None, ascii=None, disable=False, unit='it', unit_scale=False, dynamic_ncols=False, smoothing=0.3, bar_format=None, initial=0, position=None, postfix=None, unit_divisor=1000):&lt;/i&gt;&lt;/blockquote&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;iterable&lt;/code&gt; : 반복가능한 객체. range, list, tuple, dict 등을 넣을 수 있음.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;desc&lt;/code&gt; : 진행바에 출력할 문구.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;total&lt;/code&gt; : 진행바의 최대 수치. 값이 없으면 iterable의 length가 된다.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;file&lt;/code&gt; : 어디에 출력할 지를 나타내는 값. 기본값은 std.err 이다.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;unit&lt;/code&gt; : 반복의 단위를 나타내는 값. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;unit_scale&lt;/code&gt; : 큰 단위에 대해 자동적으로 scale 적용할지 여부(Kilo, Mega, Giga 등)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;주로 사용하는 것은 이 정도인 듯 하고 나머지는 &lt;a href=&quot;https://github.com/tqdm/tqdm#latest-conda-release&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;tqdm document&lt;/a&gt;에서 확인하길 바란다. 사용 예제는 다음과 같다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;사용 예&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;code&gt;from tqdm import tqdm&lt;/code&gt;, &lt;code&gt;import time&lt;/code&gt; 은 생략한다.&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;_&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;tqdm(&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #c10aff;&quot;&gt;10&lt;/span&gt;),&amp;nbsp;desc&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;'tqdm&amp;nbsp;test'&lt;/span&gt;):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;time.sleep(&lt;span style=&quot;color: #c10aff;&quot;&gt;0.&lt;/span&gt;&lt;span style=&quot;color: #c10aff;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;출력 :&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;tqdm&amp;nbsp;test:&amp;nbsp;100%|██████████|&amp;nbsp;10/10&amp;nbsp;[00:01&amp;lt;00:00,&amp;nbsp;&amp;nbsp;9.53it/s]&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;Manual로 사용&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;with&lt;/span&gt;&amp;nbsp;tqdm(total&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #c10aff;&quot;&gt;100&lt;/span&gt;,&amp;nbsp;desc&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;'tqdm&amp;nbsp;manual'&lt;/span&gt;,&amp;nbsp;unit&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;'unit'&lt;/span&gt;,&amp;nbsp;ascii&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;True&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;as&lt;/span&gt;&amp;nbsp;pbar:&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;_&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #c10aff;&quot;&gt;10&lt;/span&gt;):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;time.sleep(&lt;span style=&quot;color: #c10aff;&quot;&gt;0.&lt;/span&gt;&lt;span style=&quot;color: #c10aff;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pbar.update(&lt;span style=&quot;color: #c10aff;&quot;&gt;10&lt;/span&gt;)&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #4f4f4ftext-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;출력 :&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;tqdm&amp;nbsp;manual:&amp;nbsp;100%|##########|&amp;nbsp;100/100&amp;nbsp;[00:01&amp;lt;00:00,&amp;nbsp;95.65unit/s]&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;Manual은 선언해서 사용하는 방법도 있다.&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;pbar&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;tqdm(total&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #c10aff;&quot;&gt;1000&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #c10aff;&quot;&gt;3&lt;/span&gt;,&amp;nbsp;unit&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;'unit'&lt;/span&gt;,&amp;nbsp;unit_scale&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;True&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;for&lt;/span&gt;&amp;nbsp;_&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;range&lt;/span&gt;(&lt;span style=&quot;color: #c10aff;&quot;&gt;20&lt;/span&gt;):&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;time.sleep(&lt;span style=&quot;color: #c10aff;&quot;&gt;0.&lt;/span&gt;&lt;span style=&quot;color: #c10aff;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pbar.update(&lt;span style=&quot;color: #c10aff;&quot;&gt;1000&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #c10aff;&quot;&gt;3&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;/&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c10aff;&quot;&gt;20&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;pbar.&lt;span style=&quot;color: #4be6fa;&quot;&gt;close&lt;/span&gt;()&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #4f4f4ftext-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style=&quot;color: #000000;&quot;&gt;출력 :&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;100%|██████████|&amp;nbsp;1.00G/1.00G&amp;nbsp;[00:02&amp;lt;00:00,&amp;nbsp;478Munit/s]&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #000000;&quot;&gt;참고&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
&lt;p&gt;tqdm gitgub&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/tqdm/tqdm#latest-conda-release&quot;&gt;https://github.com/tqdm/tqdm#latest-conda-release&lt;/a&gt;&lt;/p&gt;</description>
      <category>파이썬/이론</category>
      <category>Python</category>
      <category>tqdm</category>
      <category>업데이트</category>
      <category>진행 상황</category>
      <category>진행률</category>
      <category>파이썬</category>
      <author>purplechip</author>
      <guid isPermaLink="true">https://purplechip.tistory.com/43</guid>
      <comments>https://purplechip.tistory.com/43#entry43comment</comments>
      <pubDate>Sun, 23 Aug 2020 14:11:02 +0900</pubDate>
    </item>
  </channel>
</rss>