Skip to main content

Data.read_text

Data.read_textpathencodingon_problems

Aliases: load text, open text

Documentation​

Open and read the file at the provided path.

Arguments​

  • path: The path of the file to open and read the contents of. It will accept a textual path or a file.
  • encoding: The text encoding to decode the file with. Defaults to UTF-8.
  • on_problems: Specifies the behavior when a problem occurs during the function. By default, a warning is issued, but the operation proceeds. If set to Report_Error, the operation fails with a dataflow error. If set to Ignore, the operation proceeds without errors or warnings.

Examples​

Read the data.csv file in the project directory's data directory. You​

will need to create the file data.csv manually in that directory.

      import Standard.Base.Data
import Standard.Examples

example_read = Data.read_text Examples.csv_path