ÓãCÂÛ̳

 ÕÒ»ØÃÜÂë
 Á¢¼´×¢²á
²é¿´: 1443|»Ø¸´: 1

[Òѽâ¾ö]Ϊʲô±¨´í

[¸´ÖÆÁ´½Ó]
·¢±íÓÚ 2021-1-25 21:05:22 | ÏÔʾȫ²¿Â¥²ã |ÔĶÁģʽ

ÂíÉÏ×¢²á£¬½á½»¸ü¶àºÃÓÑ£¬ÏíÓøü¶à¹¦ÄÜ^_^

ÄúÐèÒª µÇ¼ ²Å¿ÉÒÔÏÂÔØ»ò²é¿´£¬Ã»ÓÐÕ˺ţ¿Á¢¼´×¢²á

x
ÕâÊÇÓйØpandasµÄ×÷Òµ£º
Step 1. Go to https://www.kaggle.com/openfoodfacts/world-food-facts/data
Step 2. Download the dataset to your computer and unzip it.
In [2]:
import pandas as pd
import numpy as np
Step 3. Use the tsv file and assign it to a dataframe called food¶
In [3]:
food = pd.read_csv('~/Desktop/en.openfoodfacts.org.products.tsv', sep='\t')
ÔËÐе½Õâ²½ºó¾Í³ö´íÁË£¬±¨´íÈçÏ£º
IOErrorTraceback (most recent call last)
<ipython-input-13-489f4e8333cb> in <module>()
----> 1 food = pd.read_csv('~/Desktop/en.openfoodfacts.org.products.tsv', sep='\t')

4 frames
/usr/local/lib/python2.7/dist-packages/pandas/io/parsers.pyc in __init__(self, src, **kwds)
   1851         kwds['usecols'] = self.usecols
   1852
-> 1853         self._reader = parsers.TextReader(src, **kwds)
   1854         self.unnamed_cols = self._reader.unnamed_cols
   1855

pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader.__cinit__()

pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source()

IOError: [Errno 2] File /root/Desktop/en.openfoodfacts.org.products.tsv does not exist: '/root/Desktop/en.openfoodfacts.org.products.tsv'
ÓãÓÑÃÇ°ïæ¿´¿´°É
×î¼Ñ´ð°¸
2021-1-26 14:50:54
Îļþ²»´æÔÚ
ÏëÖªµÀС¼×Óã×î½üÔÚ×öɶ£¿Çë·ÃÎÊ -> ilovefishc.com
·¢±íÓÚ 2021-1-26 14:50:54 | ÏÔʾȫ²¿Â¥²ã    ±¾Â¥Îª×î¼Ñ´ð°¸   
Îļþ²»´æÔÚ
ÏëÖªµÀС¼×Óã×î½üÔÚ×öɶ£¿Çë·ÃÎÊ -> ilovefishc.com
ÄúÐèÒªµÇ¼ºó²Å¿ÉÒÔ»ØÌû µÇ¼ | Á¢¼´×¢²á

±¾°æ»ý·Ö¹æÔò

СºÚÎÝ|ÊÖ»ú°æ|Archiver|ÓãC¹¤×÷ÊÒ ( ÔÁICP±¸18085999ºÅ-1 | ÔÁ¹«Íø°²±¸ 44051102000585ºÅ)

GMT+8, 2025-1-16 16:57

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí