Skip to content

Commit

Permalink
📚 update tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Feb 16, 2022
1 parent ea3db3e commit 74bf252
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 45 deletions.
30 changes: 15 additions & 15 deletions .moban.d/one-liners.rst.jj2
Expand Up @@ -294,7 +294,7 @@ Suppose you have the following array:

.. code-block:: python

>>> data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
>>> data = [['G', 'D', 'A', 'E'], ['Thomastik-Infield Domaints', 'Thomastik-Infield Domaints', 'Thomastik-Infield Domaints', 'Pirastro'], ['Silver wound', '', 'Aluminum wound', 'Gold Label Steel']]

And here is the code to save it as an excel file :

Expand All @@ -308,13 +308,13 @@ Let's verify it:

>>> p.get_sheet(file_name="example.xls")
pyexcel_sheet1:
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 4 | 5 | 6 |
+---+---+---+
| 7 | 8 | 9 |
+---+---+---+
+----------------------------+----------------------------+----------------------------+------------------+
| G | D | A | E |
+----------------------------+----------------------------+----------------------------+------------------+
| Thomastik-Infield Domaints | Thomastik-Infield Domaints | Thomastik-Infield Domaints | Pirastro |
+----------------------------+----------------------------+----------------------------+------------------+
| Silver wound | | Aluminum wound | Gold Label Steel |
+----------------------------+----------------------------+----------------------------+------------------+

{% if sphinx %}
.. testcode::
Expand All @@ -336,13 +336,13 @@ Let's verify it:

.. code-block:: python

>>> with open("example.csv") as f:
... for line in f.readlines():
... print(line.rstrip())
...
1:2:3
4:5:6
7:8:9
>>> with open("example.csv") as f:
... for line in f.readlines():
... print(line.rstrip())
...
G:D:A:E
Thomastik-Infield Domaints:Thomastik-Infield Domaints:Thomastik-Infield Domaints:Pirastro
Silver wound::Aluminum wound:Gold Label Steel

Export a list of dictionaries
**********************************
Expand Down
30 changes: 15 additions & 15 deletions README.rst
Expand Up @@ -302,7 +302,7 @@ Suppose you have the following array:

.. code-block:: python
>>> data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
>>> data = [['G', 'D', 'A', 'E'], ['Thomastik-Infield Domaints', 'Thomastik-Infield Domaints', 'Thomastik-Infield Domaints', 'Pirastro'], ['Silver wound', '', 'Aluminum wound', 'Gold Label Steel']]
And here is the code to save it as an excel file :

Expand All @@ -316,13 +316,13 @@ Let's verify it:
>>> p.get_sheet(file_name="example.xls")
pyexcel_sheet1:
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 4 | 5 | 6 |
+---+---+---+
| 7 | 8 | 9 |
+---+---+---+
+----------------------------+----------------------------+----------------------------+------------------+
| G | D | A | E |
+----------------------------+----------------------------+----------------------------+------------------+
| Thomastik-Infield Domaints | Thomastik-Infield Domaints | Thomastik-Infield Domaints | Pirastro |
+----------------------------+----------------------------+----------------------------+------------------+
| Silver wound | | Aluminum wound | Gold Label Steel |
+----------------------------+----------------------------+----------------------------+------------------+
And here is the code to save it as a csv file :
Expand All @@ -337,13 +337,13 @@ Let's verify it:

.. code-block:: python
>>> with open("example.csv") as f:
... for line in f.readlines():
... print(line.rstrip())
...
1:2:3
4:5:6
7:8:9
>>> with open("example.csv") as f:
... for line in f.readlines():
... print(line.rstrip())
...
G:D:A:E
Thomastik-Infield Domaints:Thomastik-Infield Domaints:Thomastik-Infield Domaints:Pirastro
Silver wound::Aluminum wound:Gold Label Steel
Export a list of dictionaries
**********************************
Expand Down
30 changes: 15 additions & 15 deletions docs/source/quickstart.rst
Expand Up @@ -230,7 +230,7 @@ Suppose you have the following array:

.. code-block:: python
>>> data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
>>> data = [['G', 'D', 'A', 'E'], ['Thomastik-Infield Domaints', 'Thomastik-Infield Domaints', 'Thomastik-Infield Domaints', 'Pirastro'], ['Silver wound', '', 'Aluminum wound', 'Gold Label Steel']]
And here is the code to save it as an excel file :

Expand All @@ -244,13 +244,13 @@ Let's verify it:
>>> p.get_sheet(file_name="example.xls")
pyexcel_sheet1:
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 4 | 5 | 6 |
+---+---+---+
| 7 | 8 | 9 |
+---+---+---+
+----------------------------+----------------------------+----------------------------+------------------+
| G | D | A | E |
+----------------------------+----------------------------+----------------------------+------------------+
| Thomastik-Infield Domaints | Thomastik-Infield Domaints | Thomastik-Infield Domaints | Pirastro |
+----------------------------+----------------------------+----------------------------+------------------+
| Silver wound | | Aluminum wound | Gold Label Steel |
+----------------------------+----------------------------+----------------------------+------------------+
.. testcode::
:hide:
Expand All @@ -270,13 +270,13 @@ Let's verify it:

.. code-block:: python
>>> with open("example.csv") as f:
... for line in f.readlines():
... print(line.rstrip())
...
1:2:3
4:5:6
7:8:9
>>> with open("example.csv") as f:
... for line in f.readlines():
... print(line.rstrip())
...
G:D:A:E
Thomastik-Infield Domaints:Thomastik-Infield Domaints:Thomastik-Infield Domaints:Pirastro
Silver wound::Aluminum wound:Gold Label Steel
Export a list of dictionaries
**********************************
Expand Down

0 comments on commit 74bf252

Please sign in to comment.