🐍Python/Pandas

    [Pandas] pandas01 - World Food Facts 풀이

    Step 1. Go to https://www.kaggle.com/openfoodfacts/world-food-facts/data Step 2. Download the dataset to your computer and unzip it. Step 3. Use the tsv file and assign it to a dataframe called food -> import pandas as pd import numpy as np food = pd.read_csv(‘en.openfoodfacts.org.products.tsv', sep='\t’) Step 4. See the first 5 entries -> food.head(5) A : Step 5. What is the number of observati..

    [Pandas] Pandas01 - Occupation 풀이

    Step 1. Import the necessary libraries-> import pandas as pdStep 2. Import the dataset from this address.Step 3. Assign it to a variable called users and use the 'user_id' as index-> url ='https://raw.githubusercontent.com/justmarkham/DAT8/master/data/u.user'data = pd.read_csv(url,'|', index_col='user_id')data.head() A : 해설 : url을 보고 ‘|’로 분리되어 있는 것을 확인. Index_col을 통해 ‘user_id’를 index로 사용함Step 4...

    [Pandas] Pandas01 - Chipotle 풀이

    Step 1. Import the necessary libraries-> import pandas as pd import numpy as np Step 2. Import the dataset from this address.Step 3. Assign it to a variable called chipo.-> url = 'https://raw.githubusercontent.com/justmarkham/DAT8/master/data/chipotle.tsv'chipo = pd.read_csv(url,sep='\t') ‘\t’ 탭/indent를 의미함url을 csv로 읽어온다.Step 4. See the first 10 entries-> chipo.head(10) A : Step 5. What is the n..

    Pandas Exercise

    https://github.com/guipsamora/pandas_exercises 위의 Pandas Exercise 문제 풀이입니다아래의 순서에 따라 진행할 것 입니다. 01 - Getting & Knowing Your Data02 - Filtering & Sorting03 - Grouping04 - Apply05 - Merge06 - Stats07 - Visualization08 - Creating Series and DataFrames09 - Time Series10 - Deleting11 - Indexing