import pandas as pd
!dir
Datenträger in Laufwerk C: ist Windows Volumeseriennummer: 6E90-EACA Verzeichnis von C:\Users\Andreas\Desktop 29.04.2020 10:41 <DIR> . 29.04.2020 10:41 <DIR> .. 29.04.2020 10:17 <DIR> .ipynb_checkpoints 28.04.2020 10:09 718 box-4111.lnk 29.04.2020 10:41 5.437 Countries_Landmasses.csv 29.04.2020 10:40 5.010 Countries_Population.csv 29.04.2020 10:40 15.865 Countries_Population.xlsx 28.04.2020 10:10 821 Data&Quest.lnk 09.04.2020 13:01 87.114 Dataquest_f500_Company.csv 14.04.2020 15:48 211.540 Dataquest_laptops.csv 01.04.2020 15:41 13.225 db.docx 01.04.2020 15:40 50.535 DB.PNG 12.02.2020 00:05 2.182 DeepL.lnk 24.04.2020 12:57 <DIR> Games 27.04.2020 22:54 2.372 GitHub Desktop.lnk 10.05.2019 15:49 1.417 Microsoft Edge.lnk 12.03.2020 20:04 2.377 Microsoft Teams.lnk 24.09.2019 13:04 <DIR> Old Firefox Data 24.04.2020 12:57 478.306 original.jpg 26.10.2019 21:30 1.055 Sky Go.lnk 17.06.2019 22:37 1.867 Spotify.lnk 29.04.2020 08:03 0 UBA_Ökostrom.pdf 29.04.2020 10:41 24.297 Untitled.ipynb 16.03.2020 18:20 2.218 WhatsApp.lnk 29.04.2020 07:38 <DIR> Wissen 27.04.2020 10:08 1.944 Zoom.lnk 20 Datei(en), 908.300 Bytes 6 Verzeichnis(se), 16.456.908.800 Bytes frei
!echo %cd%
C:\Users\Andreas\Desktop
df1 = pd.read_csv("Dataquest_laptops.csv",encoding='Windows-1252')
df1
Manufacturer | Model Name | Category | Screen Size | Screen | CPU | RAM | Storage | GPU | Operating System | Operating System Version | Weight | Price (Euros) | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Apple,MacBook Pro,Ultrabook,"13.3""",IPS Panel... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
1 | Apple,Macbook Air,Ultrabook,"13.3""",1440x900,... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
2 | HP,250 G6,Notebook,"15.6""",Full HD 1920x1080,... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
3 | Apple,MacBook Pro,Ultrabook,"15.4""",IPS Panel... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
4 | Apple,MacBook Pro,Ultrabook,"13.3""",IPS Panel... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
1298 | Lenovo,Yoga 500-14ISK,2 in 1 Convertible,"14.0... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
1299 | Lenovo,Yoga 900-13ISK,2 in 1 Convertible,"13.3... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
1300 | Lenovo,IdeaPad 100S-14IBR,Notebook,"14.0""",13... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
1301 | HP,15-AC110nv (i7-6500U/6GB/1TB/Radeon,Noteboo... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
1302 | Asus,X553SA-XX031T (N3050/4GB/500GB/W10),Noteb... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
1303 rows × 13 columns
df2= pd.read_csv("Countries_population.csv",encoding='Windows-1252')
df2
China;1 | 394 | 015 | 977 | |
---|---|---|---|---|
0 | India;1 | 326 | 093 | 247.0 |
1 | United States;332 | 639 | 102 | NaN |
2 | Indonesia;267 | 026 | 366 | NaN |
3 | Pakistan;233 | 500 | 636 | NaN |
4 | Nigeria;214 | 028 | 302 | NaN |
... | ... | ... | ... | ... |
232 | Tokelau;1 | 647 | NaN | NaN |
233 | Paracel Islands;1 | 44 | NaN | NaN |
234 | Holy See (Vatican City);1 | NaN | NaN | NaN |
235 | Cocos (Keeling) Islands;596 | NaN | NaN | NaN |
236 | Pitcairn Islands;50 | NaN | NaN | NaN |
237 rows × 4 columns
df2= pd.read_csv("Countries_Landmasses.csv",encoding='Windows-1252')
df2
--------------------------------------------------------------------------- ParserError Traceback (most recent call last) <ipython-input-6-6ea2009fea9a> in <module> ----> 1 df2= pd.read_csv("Countries_Landmasses.csv",encoding='Windows-1252') 2 df2 ~\Anaconda3\lib\site-packages\pandas\io\parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision) 683 ) 684 --> 685 return _read(filepath_or_buffer, kwds) 686 687 parser_f.__name__ = name ~\Anaconda3\lib\site-packages\pandas\io\parsers.py in _read(filepath_or_buffer, kwds) 461 462 try: --> 463 data = parser.read(nrows) 464 finally: 465 parser.close() ~\Anaconda3\lib\site-packages\pandas\io\parsers.py in read(self, nrows) 1152 def read(self, nrows=None): 1153 nrows = _validate_integer("nrows", nrows) -> 1154 ret = self._engine.read(nrows) 1155 1156 # May alter columns / col_dict ~\Anaconda3\lib\site-packages\pandas\io\parsers.py in read(self, nrows) 2057 def read(self, nrows=None): 2058 try: -> 2059 data = self._reader.read(nrows) 2060 except StopIteration: 2061 if self._first_chunk: pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader.read() pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader._read_low_memory() pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader._read_rows() pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader._tokenize_rows() pandas\_libs\parsers.pyx in pandas._libs.parsers.raise_parser_error() ParserError: Error tokenizing data. C error: Expected 4 fields in line 13, saw 5