Closed Marcel-Salier closed 2 years ago
The file is in dropbox: outputD3 GFAPLbPh.csv I also wonder how I can open this and the other one with blebb: outputD3 BLEBB GFAPLbPh.csv at the same time. Before the analyzor was open everything with a CSV after a path that were contained in other directories.
Yes I anticipated this from #12. Your code is not up-to-date, pull the latest build. I included 6d3d6a30824d25ca0222dff7b39598338ee8e17c to allow import of files with a certain pattern. I have also updated the notebook (ng_analysis_2.ipynb) to allow you to specify the pattern of the csv filename
We can discuss on this tomorrow
I can meet any moment after 14hs. What's the difference between analizis 1 and 2? Now the analysis_2 is not opening in Jupyter.
Closing this, as we have fixed the issue
I open ng_analysis_2, when I add the path were I got the output:
path_to_experiments = "/Users/m./Dropbox (CDN Team)/Somia/D3 GFAPLbPh/out_ng (4)"
I used also: path_to_experiments = "/Users/m./Dropbox (CDN Team)/Somia/D3 GFAPLbPh/out_ng (4)/"
And I got same error:
ValueError Traceback (most recent call last) Input In [6], in <cell line: 2>() 1 path_to_experiments = "/Users/m./Dropbox (CDN Team)/Somia/D3 GFAPLbPh/out_ng (4)" ----> 2 obj = Analyzor(path_to_experiments)
File ~/Documents/GitHub/ng_tools/ngtools/analyzer.py:446, in Analyzor.init(self, exp_dir, filename, collated_csv) 444 self.meta = {"channels": import_channels_data(files = files)} 445 else: --> 446 dat = import_ng_data(exp_dir, filename) 447 self.data = {"raw": dat, "norm": dat} 448 self.meta = {"channels": import_channels_data(exp_dir)}
File ~/Documents/GitHub/ng_tools/ngtools/analyzer.py:391, in import_ng_data(path, filename) 389 df["path2ong"] = file 390 data_array.append(df) --> 391 data = pd.concat(data_array, axis=0, ignore_index=True) 393 unspaced_colnames = [name if not " " in name else name.replace(" ","") for name in data.columns] 394 if any(data.columns != unspaced_colnames):
File /opt/anaconda3/envs/ngtools/lib/python3.10/site-packages/pandas/util/_decorators.py:311, in deprecate_nonkeyword_arguments..decorate..wrapper(*args, *kwargs)
305 if len(args) > num_allow_args:
306 warnings.warn(
307 msg.format(arguments=arguments),
308 FutureWarning,
309 stacklevel=stacklevel,
310 )
--> 311 return func(args, **kwargs)
File /opt/anaconda3/envs/ngtools/lib/python3.10/site-packages/pandas/core/reshape/concat.py:347, in concat(objs, axis, join, ignore_index, keys, levels, names, verify_integrity, sort, copy) 143 @deprecate_nonkeyword_arguments(version=None, allowed_args=["objs"]) 144 def concat( 145 objs: Iterable[NDFrame] | Mapping[Hashable, NDFrame], (...) 154 copy: bool = True, 155 ) -> DataFrame | Series: 156 """ 157 Concatenate pandas objects along a particular axis with optional set logic 158 along the other axes. (...) 345 ValueError: Indexes have overlapping values: ['a'] 346 """ --> 347 op = _Concatenator( 348 objs, 349 axis=axis, 350 ignore_index=ignore_index, 351 join=join, 352 keys=keys, 353 levels=levels, 354 names=names, 355 verify_integrity=verify_integrity, 356 copy=copy, 357 sort=sort, 358 ) 360 return op.get_result()
File /opt/anaconda3/envs/ngtools/lib/python3.10/site-packages/pandas/core/reshape/concat.py:404, in _Concatenator.init(self, objs, axis, join, keys, levels, names, ignore_index, verify_integrity, copy, sort) 401 objs = list(objs) 403 if len(objs) == 0: --> 404 raise ValueError("No objects to concatenate") 406 if keys is None: 407 objs = list(com.not_none(*objs))
ValueError: No objects to concatenate