Difference between revisions of "Orange: CSV File Import"

From OnnoWiki
Jump to navigation Jump to search
 
(9 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
  Data Frame: pandas DataFrame object
 
  Data Frame: pandas DataFrame object
  
CSV File Import widget membaca comma-separated file dab mengirimkan dataset ke output channel. File separator bisa berupa comma, semicolon, space, tab atau manually-defined delimiters. History dari file yang baru dibuka di maintain di widget.
+
Widget CSV File Import membaca comma-separated file dan mengirimkan dataset ke output channel. Separator bisa berupa comma, semicolon, space, tab atau manually-defined delimiters. History dari file yang baru dibuka di maintain di widget.
  
 
Data Frame output dapat digunakan di [https://docs.biolab.si//3/visual-programming/widgets/data/pythonscript.html Python Script] widget dengan menyambungkannya ke in_object input (seperti, df = in_object). Sehingga dia bisa digunakan seperti DataFrame biasa.
 
Data Frame output dapat digunakan di [https://docs.biolab.si//3/visual-programming/widgets/data/pythonscript.html Python Script] widget dengan menyambungkannya ke in_object input (seperti, df = in_object). Sehingga dia bisa digunakan seperti DataFrame biasa.
Line 14: Line 14:
 
==Import Option==
 
==Import Option==
  
The import window where the user sets the import parameters. Can be re-opened by pressing Import Options in the widget.
+
Import window tempat pengguna menetapkan parameter impor. Dapat dibuka kembali dengan menekan Opsi Impor di widget.
  
Right click on the column name to set the column type. Right click on the row index (on the left) to mark a row as a header, skipped or a normal data row.
+
Klik kanan pada nama kolom untuk mengatur jenis kolom. Klik kanan pada indeks baris (di sebelah kiri) untuk menandai baris sebagai header, di skip atau baris data normal.
  
 
[[File:CSVFileImport-ImportOptions-stamped.png|center|600px|thumb]]
 
[[File:CSVFileImport-ImportOptions-stamped.png|center|600px|thumb]]
  
../../_images/CSVFileImport-ImportOptions-stamped.png
 
  
    File encoding. Default is UTF-8. See Encoding subchapter for details.
+
* File encoding. Default is UTF-8. See Encoding subchapter for details.
 
+
* Import settings:
    Import settings:
+
** Cell delimiter:
 
+
*** Tab
        Cell delimiter:
+
*** Comma
 
+
*** Semicolon
            Tab
+
*** Space
 
+
*** Other (set the delimiter in the field to the right)
            Comma
+
** Quote character: either “ or ‘. Defines what is considered a text.
 
+
** Number separators:
            Semicolon
+
*** Grouping: delimiters for thousands, e.g. 1,000
 
+
*** Decimal: delimiters for decimals, e.g. 1.234
            Space
+
* Column type: select the column in the preview and set its type. Column type can be set also by right-clicking on the selected column.
 
+
** Auto: Orange will automatically try to determine column type. (default)
            Other (set the delimiter in the field to the right)
+
** Numeric: for continuous data types, e.g. (1.23, 1.32, 1.42, 1.32)
 
+
** Categorical: for discrete data types, e.g. (brown, green, blue)
        Quote character: either “ or ‘. Defines what is considered a text.
+
** Text: for string data types, e.g. (John, Olivia, Mike, Jane)
 
+
** Datetime: for time variables, e.g. (1970-01-01)
        Number separators:
+
** Ignore: do not output the column.
 
+
* Pressing Reset will return the settings to the previously set state (saved by pressing OK in the Import Options dialogue). Restore Defaults will set the settings to their default values. Cancel aborts the import, while OK imports the data and saves the settings.
            Grouping: delimiters for thousands, e.g. 1,000
 
 
 
            Decimal: delimiters for decimals, e.g. 1.234
 
 
 
    Column type: select the column in the preview and set its type. Column type can be set also by right-clicking on the selected column.
 
 
 
        Auto: Orange will automatically try to determine column type. (default)
 
 
 
        Numeric: for continuous data types, e.g. (1.23, 1.32, 1.42, 1.32)
 
 
 
        Categorical: for discrete data types, e.g. (brown, green, blue)
 
 
 
        Text: for string data types, e.g. (John, Olivia, Mike, Jane)
 
 
 
        Datetime: for time variables, e.g. (1970-01-01)
 
 
 
        Ignore: do not output the column.
 
 
 
    Pressing Reset will return the settings to the previously set state (saved by pressing OK in the Import Options dialogue). Restore Defaults will set the settings to their default values. Cancel aborts the import, while OK imports the data and saves the settings.
 
  
 
==Widget==
 
==Widget==
  
The widget once the data is successfully imported.
+
Widget setelah data berhasil diimpor.
  
../../_images/CSVFileImport-widget-stamped.png
+
[[File:CSVFileImport-widget-stamped.png|center|600px|thumb]]
  
    The folder icon opens the dialogue for import the local .csv file. It can be used to either load the first file or change the existing file (load new data). The File dropdown stores paths to previously loaded data sets.
+
# Ikon folder membuka dialog untuk mengimpor file .csv lokal. Ini dapat digunakan untuk memuat file pertama atau mengubah file yang ada (memuat data baru). File dropdown menyimpan path ke set data yang sebelumnya dimuat.
 
+
# Informasi tentang set data yang diimpor. Report tentang jumlah instance (baris), variabel (fitur atau kolom) dan variabel meta (kolom khusus).
    Information on the imported data set. Reports on the number of instances (rows), variables (features or columns) and meta variables (special columns).
+
# Opsi Impor membuka kembali dialog impor di mana pengguna dapat mengatur delimiters, encodings, text field dan sebagainya. Cancel akan membatalkan impor data. Reload akan memuat ulang mengimpor file sekali lagi, menambah data setiap perubahan yang dibuat dalam file asli.
 
 
    Import Options re-opens the import dialogue where the user can set delimiters, encodings, text fields and so on. Cancel aborts data import. Reload imports the file once again, adding to the data any changes made in the original file.
 
  
 
==Encoding==
 
==Encoding==
  
The dialogue for settings custom encodings list in the Import Options - Encoding dropdown. Select Customize Encodings List… to change which encodings appear in the list. To save the changes, simply close the dialogue. Closing and reopening Orange (even with Reset widget settings) will not re-set the list. To do this, press Restore Defaults. To have all the available encodings in the list, press Select all.
+
Dialog untuk pengaturan custom encodings list dalam Opsi Impor - dropdown Encoding. Pilih Customize Encodings List… untuk mengubah encoding mana yang muncul dalam daftar. Untuk menyimpan perubahan, cukup tutup dialog. Menutup dan membuka kembali Orange (walaupun dengan Reset pengaturan widget) tidak akan me-re-set list. Untuk melakukan ini, tekan Restore Defaults. Untuk memiliki semua encoding yang tersedia dalam list, tekan Select all.
  
../../_images/CSVFileImport-encodings.png
+
[[File:CSVFileImport-encodings.png|center|600px|thumb]]
  
 
==Contoh==
 
==Contoh==
  
CSV File Import works almost exactly like the File widget, with the added options for importing different types of .csv files. In this workflow, the widget read the data from the file and sends it to the Data Table for inspection.
+
Bekerjanya Impor File CSV hampir persis seperti widget File, dengan opsi yang ditambahkan untuk mengimpor berbagai jenis file .csv. Dalam workflow ini, widget membaca data dari file dan mengirimkannya ke [[Data Table]] untuk diperiksa.
 
 
../../_images/CSVFileImport-Example.png
 
 
 
  
 +
[[File:CSVFileImport-Example.png|center|600px|thumb]]
  
 
==Referensi==
 
==Referensi==

Latest revision as of 09:59, 9 March 2020

Sumber: https://docs.biolab.si//3/visual-programming/widgets/data/csvfileimport.html

Import data table dari CSV formatted file.

Output

Data: dataset dari .csv file
Data Frame: pandas DataFrame object

Widget CSV File Import membaca comma-separated file dan mengirimkan dataset ke output channel. Separator bisa berupa comma, semicolon, space, tab atau manually-defined delimiters. History dari file yang baru dibuka di maintain di widget.

Data Frame output dapat digunakan di Python Script widget dengan menyambungkannya ke in_object input (seperti, df = in_object). Sehingga dia bisa digunakan seperti DataFrame biasa.

Import Option

Import window tempat pengguna menetapkan parameter impor. Dapat dibuka kembali dengan menekan Opsi Impor di widget.

Klik kanan pada nama kolom untuk mengatur jenis kolom. Klik kanan pada indeks baris (di sebelah kiri) untuk menandai baris sebagai header, di skip atau baris data normal.

CSVFileImport-ImportOptions-stamped.png


  • File encoding. Default is UTF-8. See Encoding subchapter for details.
  • Import settings:
    • Cell delimiter:
      • Tab
      • Comma
      • Semicolon
      • Space
      • Other (set the delimiter in the field to the right)
    • Quote character: either “ or ‘. Defines what is considered a text.
    • Number separators:
      • Grouping: delimiters for thousands, e.g. 1,000
      • Decimal: delimiters for decimals, e.g. 1.234
  • Column type: select the column in the preview and set its type. Column type can be set also by right-clicking on the selected column.
    • Auto: Orange will automatically try to determine column type. (default)
    • Numeric: for continuous data types, e.g. (1.23, 1.32, 1.42, 1.32)
    • Categorical: for discrete data types, e.g. (brown, green, blue)
    • Text: for string data types, e.g. (John, Olivia, Mike, Jane)
    • Datetime: for time variables, e.g. (1970-01-01)
    • Ignore: do not output the column.
  • Pressing Reset will return the settings to the previously set state (saved by pressing OK in the Import Options dialogue). Restore Defaults will set the settings to their default values. Cancel aborts the import, while OK imports the data and saves the settings.

Widget

Widget setelah data berhasil diimpor.

CSVFileImport-widget-stamped.png
  1. Ikon folder membuka dialog untuk mengimpor file .csv lokal. Ini dapat digunakan untuk memuat file pertama atau mengubah file yang ada (memuat data baru). File dropdown menyimpan path ke set data yang sebelumnya dimuat.
  2. Informasi tentang set data yang diimpor. Report tentang jumlah instance (baris), variabel (fitur atau kolom) dan variabel meta (kolom khusus).
  3. Opsi Impor membuka kembali dialog impor di mana pengguna dapat mengatur delimiters, encodings, text field dan sebagainya. Cancel akan membatalkan impor data. Reload akan memuat ulang mengimpor file sekali lagi, menambah data setiap perubahan yang dibuat dalam file asli.

Encoding

Dialog untuk pengaturan custom encodings list dalam Opsi Impor - dropdown Encoding. Pilih Customize Encodings List… untuk mengubah encoding mana yang muncul dalam daftar. Untuk menyimpan perubahan, cukup tutup dialog. Menutup dan membuka kembali Orange (walaupun dengan Reset pengaturan widget) tidak akan me-re-set list. Untuk melakukan ini, tekan Restore Defaults. Untuk memiliki semua encoding yang tersedia dalam list, tekan Select all.

CSVFileImport-encodings.png

Contoh

Bekerjanya Impor File CSV hampir persis seperti widget File, dengan opsi yang ditambahkan untuk mengimpor berbagai jenis file .csv. Dalam workflow ini, widget membaca data dari file dan mengirimkannya ke Data Table untuk diperiksa.

CSVFileImport-Example.png

Referensi

Pranala Menarik