|
197 | 197 | "cell_type": "markdown", |
198 | 198 | "metadata": {}, |
199 | 199 | "source": [ |
200 | | - "Note that if this means the entire file will be read into memory, if you are operating on a large file and don't actually need all the data at the same time this is rather inefficient.\n", |
| 200 | + "Note that this means the entire file will be read into memory. If you are operating on a large file and don't actually need all the data at the same time this is rather inefficient.\n", |
201 | 201 | "\n", |
202 | | - "Frequently, we just need to operate on individuals lines of the file, and you can use the `.readline` method to read a line from a file and return it as a python string.\n", |
| 202 | + "Frequently, we just need to operate on individual lines of the file, and you can use the `.readline` method to read a line from a file and return it as a python string.\n", |
203 | 203 | "\n", |
204 | 204 | "File objects internally keep track of your current location in a file, so to get following lines from the file you can call this method multiple times.\n", |
205 | 205 | "\n", |
|
730 | 730 | " - [The Python Tutorial](https://docs.python.org/3/tutorial/index.html)\n", |
731 | 731 | " - [Modules](https://docs.python.org/3/tutorial/modules.html)\n", |
732 | 732 | " - [Brief Tour of the Standard Library: Mathematics](https://docs.python.org/3/tutorial/stdlib.html#mathematics)\n", |
733 | | - " - [The Python Standard Library Reference](https://docs.python.org/3/library/index.html) is the documentation of all libraries included within Python as well as build-in functions and data types like:\n", |
| 733 | + " - [The Python Standard Library Reference](https://docs.python.org/3/library/index.html) is the documentation of all libraries included within Python as well as built-in functions and data types like:\n", |
734 | 734 | " - [Text Sequence Type — `str`](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\n", |
735 | 735 | " - [`math` — Mathematical functions](https://docs.python.org/3/library/math.html)\n", |
736 | 736 | " - [`csv` — CSV File Reading and Writing](https://docs.python.org/3/library/csv.html)\n", |
|
748 | 748 | "\n", |
749 | 749 | "The csv module’s `reader()` and `writer()` methods read and write CSV files. You can also read and write data into dictionary form using the `DictReader()` and `DictWriter()` methods.\n", |
750 | 750 | "\n", |
751 | | - "For more information about this build-in Python library about [CSV File Reading and Writing documentation](https://docs.python.org/3/library/csv.html).\n", |
| 751 | + "For more information about this built-in Python library about [CSV File Reading and Writing documentation](https://docs.python.org/3/library/csv.html).\n", |
752 | 752 | "\n", |
753 | 753 | "Let's now read our `data/mydata.txt` file using the `csv` module." |
754 | 754 | ] |
|
950 | 950 | ], |
951 | 951 | "metadata": { |
952 | 952 | "kernelspec": { |
953 | | - "display_name": "Python 3", |
| 953 | + "display_name": "Python 2", |
954 | 954 | "language": "python", |
955 | | - "name": "python3" |
| 955 | + "name": "python2" |
956 | 956 | }, |
957 | 957 | "language_info": { |
958 | 958 | "codemirror_mode": { |
959 | 959 | "name": "ipython", |
960 | | - "version": 3 |
| 960 | + "version": 2 |
961 | 961 | }, |
962 | 962 | "file_extension": ".py", |
963 | 963 | "mimetype": "text/x-python", |
964 | 964 | "name": "python", |
965 | 965 | "nbconvert_exporter": "python", |
966 | | - "pygments_lexer": "ipython3", |
967 | | - "version": "3.5.2" |
| 966 | + "pygments_lexer": "ipython2", |
| 967 | + "version": "2.7.12" |
968 | 968 | } |
969 | 969 | }, |
970 | 970 | "nbformat": 4, |
|
0 commit comments