官术网_书友最值得收藏!

  • Using OpenRefine
  • Ruben Verborgh Max De Wilde
  • 405字
  • 2021-08-06 16:57:13

Recipe 4 – manipulating columns

In this recipe, you will learn how the columns in OpenRefine can be collapsed and expanded again, moved around in any direction, or renamed and removed at leisure.

Columns are an essential part of OpenRefine: they contain thousands of values of the same nature and can be manipulated in a number of ways.

Collapsing and expanding columns

By default, all columns are expanded in OpenRefine, which can be cumbersome if there are many in the project. If you want to temporarily hide one or more columns to facilitate the work on the others, click on the dropdown in any column to show the menu and select View. Four options are available to you:

  • Collapse this column
  • Collapse all other columns
  • Collapse columns to left
  • Collapse columns to right

Here is a screenshot of the Powerhouse dataset after navigating to View | Collapse all other columns on the column Categories. To expand a column again, just click on it. To expand all of them and go back to the initial view, see the Moving columns around section in this recipe.

Moving columns around

In some cases, it might be useful to change the order of the columns from the original file, for instance, to bring together columns that need to be compared. To achieve this, enter the menu of the chosen column and click on Edit column. Again, four options are available at the bottom of the submenu:

  • Move column to beginning
  • Move column to end
  • Move column to left
  • Move column to right

If you want to reorder the columns completely, use the first column called All. This column allows you to perform operations on several columns at the same time. The View option offers a quick way to collapse or expand all columns, while Edit columns | Re-order / remove columns... is an efficient way to rearrange columns by dragging them around or suppressing them by dropping them on the right, as shown in the following screenshot:

Renaming and removing columns

Under the same Edit column menu item, you also have the possibility to:

  • Rename this column
  • Remove this column

You could use renaming to suppress the unnecessary dot at the end of the Description column header, for instance. Removing a column is clearly more radical than simply collapsing it, but this can nevertheless be reversed, as you will learn by reading Recipe 5 – using the project history.

主站蜘蛛池模板: 辽源市| 兖州市| 甘南县| 岳池县| 梁平县| 济南市| 嘉荫县| 贵南县| 镇坪县| 河南省| 偏关县| 尖扎县| 沅江市| 平和县| 米泉市| 高州市| 依兰县| 中山市| 来安县| 阳东县| 镇坪县| 安泽县| 新余市| 梁河县| 杭锦后旗| 马山县| 通江县| 西乌| 三穗县| 镇康县| 枣阳市| 彭山县| 五家渠市| 泾阳县| 吉隆县| 辉县市| 义乌市| 承德市| 永清县| 泾川县| 沅陵县|