larray.Session.to_csv¶
-
Session.to_csv(fname, names=None, display=False, **kwargs)[source]¶ Dumps all array objects from the current session to CSV files.
Parameters: fname : str
Path for the directory that will contain CSV files.
names : list of str or None, optional
List of names of objects to dump. Defaults to all objects present in the Session.
display : bool, optional
Whether or not to display which file is being worked on. Defaults to False.
Examples
>>> arr1, arr2, arr3 = ndtest((2, 2)), ndtest(4), ndtest((3, 2)) >>> s = Session([('arr1', arr1), ('arr2', arr2), ('arr3', arr3)])
Save all arrays
>>> s.to_csv('./Output')
Save only some arrays
>>> s.to_csv('./Output', ['arr1', 'arr3'])