@@ -14,7 +14,7 @@ Using the parsers module, we can load file data into simple and easy-to-work-wit
14142) To get the data table, we will use the ``loadData `` function. The default behavior of this
1515 function is to find and extract a data table from a file.::
1616
17- from diffpy.utils.parsers import loadData
17+ from diffpy.utils.parsers.loaddata import loadData
1818 data_table = loadData('<PATH to data.txt>')
1919
2020 While this will work with most datasets, on our ``data.txt `` file, we got a ``ValueError ``. The reason for this is
@@ -53,7 +53,7 @@ Using the parsers module, we can load file data into simple and easy-to-work-wit
53534) Rather than working with separate ``data_table `` and ``hdata `` objects, it may be easier to combine them into a single
5454 dictionary. We can do so using the ``serialize_data `` function. ::
5555
56- from diffpy.utils.parsers import serialize_data
56+ from diffpy.utils.parsers.loaddata import serialize_data
5757 file_data = serialize_data('<PATH to data.txt', hdata, data_table)
5858 # File data is a dictionary with a single key
5959 # The key is the file name (in our case, 'data.txt')
@@ -84,7 +84,7 @@ Using the parsers module, we can load file data into simple and easy-to-work-wit
8484 The returned value, ``parsed_file_data ``, is the dictionary we just added to ``serialfile.json ``.
8585 To extract the data from the serial file, we use ``deserialize_data ``. ::
8686
87- from diffpy.utils.parsers import deserialize_data
87+ from diffpy.utils.parsers.serialization import deserialize_data
8888 parsed_file_data = deserialize_data('<PATH to serialdata.json>')
8989
90906) Finally, ``serialize_data `` allows us to store data from multiple text file in a single serial file. For one last bit
0 commit comments