Skip to content

Commit b04474e

Browse files
authored
Updated Language
Improved English
1 parent da1d24d commit b04474e

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Diff for: getting_started/python-client/lesson_2.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Lesson 2 - Importing a CSV file into the database
22

3-
> **_NOTE:_** from version 10.1.0 the cli command is `tdbpy` instead of `terminusdb`
3+
> **_NOTE:_** from version 10.1.0 the CLI command is `tdbpy` instead of `terminusdb`
44
55
## The `tdbpy importcsv` Command
66

7-
In this lesson, we will try to import a CSV file with the `tdbpy importcsv` command. It provide a very simple way to import a CSV with less manual effort. There are a few things that you can control with the `tdbpy importcsv` command, like setting the separator character, how to handle NAs and linking columns using a key columns etc. For more complicated data handling, a Python script will be needed and we will demonstrate that the next lesson: [Importing data form Python script](lesson_3.md)
7+
In this lesson, we will import a CSV file with the `tdbpy importcsv` command. It provides a very simple way to import a CSV. There are a few things that you can control with the `tdbpy importcsv` command, such as setting the separator character, how to handle NAs, and linking columns using a key columns. For more complicated data handling, a Python script is needed and we will demonstrate that in lesson 5: [Importing data form Python script](lesson_3.md)
88

9-
To see all the available options in `tdbpy importcsv`:
9+
The example below enables you to see all the available options in `tdbpy importcsv`:
1010

1111
```
1212
$ tdbpy importcsv --help
@@ -16,21 +16,21 @@ Usage: tdbpy importcsv [OPTIONS] CSV_FILE [KEYS]...
1616
read_csv() options. Options like chunksize, sep etc
1717
1818
Options:
19-
--classname TEXT Customize the class name that the data from the
20-
CSV will be import as
19+
--classname TEXT Customize the class name that data from the
20+
CSV will be imported as
2121
22-
--chunksize INTEGER Large files will be load into database in
22+
--chunksize INTEGER Large files will load into the database in
2323
chunks, size of the chunks [default: 1000]
2424
25-
--schema Specify if schema to be updated if existed,
25+
--schema Specify if the schema is to be updated if it exists,
2626
default False
2727
2828
--na [skip|optional|error] Specify how to handle NAs: 'skip' will skip
2929
entries with NAs, 'optional' will make all
3030
properties optional in the database, 'error'
31-
will just throw an error if there's NAs
31+
will just throw an error if there are NAs
3232
33-
--id TEXT Specify column to be used as ids instead of
33+
--id TEXT Specify the column to be used as ids instead of
3434
generated ids
3535
3636
-e, --embedded TEXT Specify embedded columns
@@ -43,7 +43,7 @@ Options:
4343

4444
## Importing CSV
4545

46-
Continue working with the phonebook example. We can now try to import the [Employees.csv](Employees.csv) file. Which looks like this:
46+
We will continue working with the phonebook example. We will import the [Employees.csv](Employees.csv) file. Which looks like this:
4747

4848
| Employee id | Name | Title | Team | Manager |
4949
| ----------- | -------------- | ------------------- | ----------- | ----------- |
@@ -52,7 +52,7 @@ Continue working with the phonebook example. We can now try to import the [Emplo
5252
| 003 | Alanah Bloggs | Frontend Developer | IT | 004 |
5353
| 004 | Fabian Dalby | Web Service Manager | IT | |
5454

55-
As you see there are `Employee id` which are used as a key to link the `Manager` field to the person that is the manager of that employee.
55+
As you see there is `Employee id` used as a key to link to the `Manager` field showing who the employee's manager is.
5656

5757
To link them, we must first install the `pandas` library.
5858
```sh
@@ -68,7 +68,7 @@ Schema object EmployeesFromCSV created with Employees.csv being imported into da
6868
Records in Employees.csv inserted as type EmployeesFromCSV into database with specified ids.
6969
```
7070

71-
We have imported the CSV file with the class as `EmployeesFromCSV` you can see that there is a new class object in `schema.py` that is created as well:
71+
We have imported the CSV file with the class as `EmployeesFromCSV`. There is a new class object in `schema.py` that was created along with the import:
7272

7373
```python
7474
class EmployeesFromCSV(DocumentTemplate):
@@ -86,7 +86,7 @@ $ tdbpy alldocs
8686
[{'@id': 'EmployeesFromCSV/001', '@type': 'EmployeesFromCSV', 'employee_id': '001', 'name': 'Destiny Norris', 'team': 'Marketing', 'title': 'Marketing Manager'}, {'@id': 'EmployeesFromCSV/002', '@type': 'EmployeesFromCSV', 'employee_id': '002', 'manager': 'EmployeesFromCSV/001', 'name': 'Darci Prosser', 'team': 'Marketing', 'title': 'Creative Writer'}, {'@id': 'EmployeesFromCSV/003', '@type': 'EmployeesFromCSV', 'employee_id': '003', 'manager': 'EmployeesFromCSV/004', 'name': 'Alanah Bloggs', 'team': 'IT', 'title': 'Frontend Developer'}, {'@id': 'EmployeesFromCSV/004', '@type': 'EmployeesFromCSV', 'employee_id': '004', 'name': 'Fabian Dalby', 'team': 'IT', 'title': 'Web Service Manager'}]
8787
```
8888

89-
In [later chapters](lesson_5.md) we will also learn how to query this data and/ or export data into CSV ([or using Singer.io to export data into other data products](https://github.com/terminusdb/terminusdb-tutorials/tree/master/google_sheets/README.md)).
89+
In [chapter 5](lesson_5.md) we will learn how to query this data and/ or export data into CSV.
9090

9191
---
9292

0 commit comments

Comments
 (0)