Icon

02 Write Data to a File - Solution

Solution to an exercise for exporting data.

Export data into a CSV file.

CHECK YOUR ANSWERS:
27 countries/territories in the data have maximum 1 million inhabitants and the travel risk category 1 (exercise normal precautions).


Exercise: Write Data to a FileRead the JoinedCountryTable.table file by executing the Table Reader node. This table contains information about the demographics,geolocation, and travel risks in the different countries/territories in 2020.1) Filter the data to the countries/territories in the travel risk category 1 (exercise normal precautions)2) Filter the data further to those with maximum 1 million inhabitants in 2019. How many countries/territories are they?3) Write the filtered data into a SmallSafeCountries.csv file in the data folder of the course. Overwrite the file, if it already exists. JoinedCountryData.tableT ravel risk category 1Population>= 1 millionWriteSmallSafeCountries.csvTable Reader Row Filter Row Filter CSV Writer Exercise: Write Data to a FileRead the JoinedCountryTable.table file by executing the Table Reader node. This table contains information about the demographics,geolocation, and travel risks in the different countries/territories in 2020.1) Filter the data to the countries/territories in the travel risk category 1 (exercise normal precautions)2) Filter the data further to those with maximum 1 million inhabitants in 2019. How many countries/territories are they?3) Write the filtered data into a SmallSafeCountries.csv file in the data folder of the course. Overwrite the file, if it already exists. JoinedCountryData.tableT ravel risk category 1Population>= 1 millionWriteSmallSafeCountries.csvTable Reader Row Filter Row Filter CSV Writer

Nodes

Extensions

Links