@@ -41,8 +41,7 @@ The pandas I/O API is a set of top level ``reader`` functions accessed like |
|
|
41 |
41 |
|
42 |
42 |
.. note:: |
43 |
43 |
For examples that use the ``StringIO`` class, make sure you import it |
44 |
|
- according to your Python version, i.e. ``from StringIO import StringIO`` for |
45 |
|
- Python 2 and ``from io import StringIO`` for Python 3. |
|
44 |
+ with ``from io import StringIO`` for Python 3. |
46 |
45 |
|
47 |
46 |
.. _io.read_csv_table: |
48 |
47 |
|
@@ -912,16 +911,6 @@ data columns: |
|
|
912 |
911 |
significantly faster, ~20x has been observed. |
913 |
912 |
|
914 |
913 |
|
915 |
|
-.. note:: |
916 |
|
- |
917 |
|
- When passing a dict as the `parse_dates` argument, the order of |
918 |
|
- the columns prepended is not guaranteed, because `dict` objects do not impose |
919 |
|
- an ordering on their keys. On Python 2.7+ you may use `collections.OrderedDict` |
920 |
|
- instead of a regular `dict` if this matters to you. Because of this, when using a |
921 |
|
- dict for 'parse_dates' in conjunction with the `index_col` argument, it's best to |
922 |
|
- specify `index_col` as a column label rather then as an index on the resulting frame. |
923 |
|
- |
924 |
|
- |
925 |
914 |
Date parsing functions |
926 |
915 |
++++++++++++++++++++++ |
927 |
916 |
|
@@ -2453,7 +2442,7 @@ Specify a number of rows to skip: |
|
|
2453 |
2442 |
|
2454 |
2443 |
dfs = pd.read_html(url, skiprows=0) |
2455 |
2444 |
|
2456 |
|
-Specify a number of rows to skip using a list (``xrange`` (Python 2 only) works |
|
2445 |
+Specify a number of rows to skip using a list (``range`` works |
2457 |
2446 |
as well): |
2458 |
2447 |
|
2459 |
2448 |
.. code-block:: python |
@@ -3124,11 +3113,7 @@ Pandas supports writing Excel files to buffer-like objects such as ``StringIO`` |
|
|
3124 |
3113 |
|
3125 |
3114 |
.. code-block:: python |
3126 |
3115 |
|
3127 |
|
- # Safe import for either Python 2.x or 3.x |
3128 |
|
- try: |
3129 |
|
- from io import BytesIO |
3130 |
|
- except ImportError: |
3131 |
|
- from cStringIO import StringIO as BytesIO |
|
3116 |
+ from io import BytesIO |
3132 |
3117 |
|
3133 |
3118 |
bio = BytesIO() |
3134 |
3119 |
|