Repository: Avaiga/taipy
File: taipy/core/data/csv.py (Python)

Code before:
            {
                self._PATH_KEY,
                self._DEFAULT_PATH_KEY,
                self._DEFAULT_DATA_KEY,
                self._IS_GENERATED_KEY,
                self._HAS_HEADER_PROPERTY,
                self._EXPOSED_TYPE_PROPERTY,
                self.__ENCODING_KEY,
            }
        )

    @classmethod
    def storage_type(cls) -> str:
        return cls.__STORAGE_TYPE

    def write_with_column_names(self, data: Any, columns: Optional[List[str]] = None, editor_id: Optional[str] = None):
        """Write a selection of columns.

        Arguments:
            data (Any): The data to write.
            columns (Optional[List[str]]): The list of column names to write.
            editor_id (str): An optional identifier of the writer.
        """
        self._write(data, columns)
        timestamp = datetime.now()
        self.track_edit(editor_id=editor_id, timestamp=timestamp)

    def _read(self):
        return self._read_from_path()

    def _read_from_path(self, path: Optional[str] = None, **read_kwargs) -> Any:
        if path is None:
            path = self._path

        properties = self.properties
        if properties[self._EXPOSED_TYPE_PROPERTY] == self._EXPOSED_TYPE_PANDAS:
            return self._read_as_pandas_dataframe(path=path)
        if properties[self._EXPOSED_TYPE_PROPERTY] == self._EXPOSED_TYPE_NUMPY:
            return self._read_as_numpy(path=path)
        return self._read_as(path=path)

    def _read_as(self, path: str):
        properties = self.properties
        with open(path, encoding=properties[self.__ENCODING_KEY]) as csvFile:
            if properties[self._HAS_HEADER_PROPERTY]:
                reader_with_header = csv.DictReader(csvFile)
                return [self._decoder(line) for line in reader_with_header]

            reader_without_header = csv.reader(csvFile)
            return [self._decoder(line) for line in reader_without_header]


Review comment (suggestion):
```suggestion
        self.track_edit(editor_id=editor_id, timestamp=datetime.now())
```

Code after:
            {
                self._PATH_KEY,
                self._DEFAULT_PATH_KEY,
                self._DEFAULT_DATA_KEY,
                self._IS_GENERATED_KEY,
                self._HAS_HEADER_PROPERTY,
                self._EXPOSED_TYPE_PROPERTY,
                self.__ENCODING_KEY,
            }
        )

    @classmethod
    def storage_type(cls) -> str:
        return cls.__STORAGE_TYPE

    def write_with_column_names(self, data: Any, columns: Optional[List[str]] = None, editor_id: Optional[str] = None):
        """Write a selection of columns.

        Arguments:
            data (Any): The data to write.
            columns (Optional[List[str]]): The list of column names to write.
            editor_id (str): An optional identifier of the writer.
        """
        self._write(data, columns)
        self.track_edit(editor_id=editor_id, timestamp=datetime.now())

    def _read(self):
        return self._read_from_path()

    def _read_from_path(self, path: Optional[str] = None, **read_kwargs) -> Any:
        if path is None:
            path = self._path

        properties = self.properties
        if properties[self._EXPOSED_TYPE_PROPERTY] == self._EXPOSED_TYPE_PANDAS:
            return self._read_as_pandas_dataframe(path=path)
        if properties[self._EXPOSED_TYPE_PROPERTY] == self._EXPOSED_TYPE_NUMPY:
            return self._read_as_numpy(path=path)
        return self._read_as(path=path)

    def _read_as(self, path: str):
        properties = self.properties
        with open(path, encoding=properties[self.__ENCODING_KEY]) as csvFile:
            if properties[self._HAS_HEADER_PROPERTY]:
                reader_with_header = csv.DictReader(csvFile)
                return [self._decoder(line) for line in reader_with_header]

            reader_without_header = csv.reader(csvFile)
            return [self._decoder(line) for line in reader_without_header]

    def _read_as_numpy(self, path: str) -> np.ndarray: