You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: getting_started/python-client/lesson_2.md
+13-13
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
# Lesson 2 - Importing a CSV file into the database
2
2
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`
4
4
5
5
## The `tdbpy importcsv` Command
6
6
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)
8
8
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`:
| 004 | Fabian Dalby | Web Service Manager | IT ||
54
54
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.
56
56
57
57
To link them, we must first install the `pandas` library.
58
58
```sh
@@ -68,7 +68,7 @@ Schema object EmployeesFromCSV created with Employees.csv being imported into da
68
68
Records in Employees.csv inserted as type EmployeesFromCSV into database with specified ids.
69
69
```
70
70
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:
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.
0 commit comments