Data.read_text
Data.read_textpathencoding on_problems
Group: Input
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 toReport_Error
, the operation fails with a dataflow error. If set toIgnore
, 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