ValueError Traceback (most recent call last)
in
1 for i in range(0,n):
----> 2 nombres[i] = import_files(files_with_compare(ruta, nombres[i]))
in files_with_compare(root_folder, keyword)
5
6 def files_with_compare(root_folder, keyword):
----> 7 for filename in glob.iglob(os.path.join('**', '*'+ keyword + '.ENZ'), recursive=True):
8 return filename
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\ops_init_.py in f(self, other, axis, level, fill_value)
781 self = self.fillna(fill_value)
782
--> 783 new_data = dispatch_to_series(self, other, op, str_rep)
784 return self._construct_result(new_data)
785
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\ops_init_.py in dispatch_to_series(left, right, func, str_rep, axis)
379 # Get the appropriate array-op to apply to each block's values.
380 array_op = get_array_op(func, str_rep=str_rep)
--> 381 bm = left._data.apply(array_op, right=right)
382 return type(left)(bm)
383
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\internals\managers.py in apply(self, f, filter, **kwargs)
438
439 if callable(f):
--> 440 applied = b.apply(f, **kwargs)
441 else:
442 applied = getattr(b, f)(**kwargs)
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\internals\blocks.py in apply(self, func, **kwargs)
388 """
389 with np.errstate(all="ignore"):
--> 390 result = func(self.values, **kwargs)
391
392 if is_extension_array_dtype(result) and result.ndim > 1:
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\ops\array_ops.py in arithmetic_op(left, right, op, str_rep)
195 else:
196 with np.errstate(all="ignore"):
--> 197 res_values = na_arithmetic_op(lvalues, rvalues, op, str_rep)
198
199 return res_values
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\ops\array_ops.py in na_arithmetic_op(left, right, op, str_rep)
147
148 try:
--> 149 result = expressions.evaluate(op, str_rep, left, right)
150 except TypeError:
151 result = masked_arith_op(left, right, op)
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expressions.py in evaluate(op, op_str, a, b, use_numexpr)
206 use_numexpr = use_numexpr and _bool_arith_check(op_str, a, b)
207 if use_numexpr:
--> 208 return _evaluate(op, op_str, a, b)
209 return _evaluate_standard(op, op_str, a, b)
210
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expressions.py in _evaluate_numexpr(op, op_str, a, b)
112 f"a_value {op_str} b_value",
113 local_dict={"a_value": a_value, "b_value": b_value},
--> 114 casting="safe",
115 )
116
C:\ProgramData\Anaconda3\lib\site-packages\numexpr\necompiler.py in evaluate(ex, local_dict, global_dict, out, order, casting, **kwargs)
820 # Create a signature
821 signature = [(name, getType(arg)) for (name, arg) in
--> 822 zip(names, arguments)]
823
824 # Look up numexpr if possible.
C:\ProgramData\Anaconda3\lib\site-packages\numexpr\necompiler.py in (.0)
819
820 # Create a signature
--> 821 signature = [(name, getType(arg)) for (name, arg) in
822 zip(names, arguments)]
823
C:\ProgramData\Anaconda3\lib\site-packages\numexpr\necompiler.py in getType(a)
701 if kind == 'S':
702 return bytes
--> 703 raise ValueError("unknown type %s" % a.dtype.name)
704
705
ValueError: unknown type str32
Si me pueden ayudar se los agradezco,
---
ValueError Traceback (most recent call last)
<ipython-input-226-345d3656fd60> in <module>
1 for i in range(0,n):
----> 2 nombres[i] = import_files(files_with_compare(ruta, nombres[i]))
<ipython-input-90-4e13a4243b2b> in files_with_compare(root_folder, keyword)
5
6 def files_with_compare(root_folder, keyword):
----> 7 for filename in glob.iglob(os.path.join('**', '*'+ keyword + '.ENZ'), recursive=True):
8 return filename
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\ops\__init__.py in f(self, other, axis, level, fill_value)
781 self = self.fillna(fill_value)
782
--> 783 new_data = dispatch_to_series(self, other, op, str_rep)
784 return self._construct_result(new_data)
785
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\ops\__init__.py in dispatch_to_series(left, right, func, str_rep, axis)
379 # Get the appropriate array-op to apply to each block's values.
380 array_op = get_array_op(func, str_rep=str_rep)
--> 381 bm = left._data.apply(array_op, right=right)
382 return type(left)(bm)
383
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\internals\managers.py in apply(self, f, filter, **kwargs)
438
439 if callable(f):
--> 440 applied = b.apply(f, **kwargs)
441 else:
442 applied = getattr(b, f)(**kwargs)
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\internals\blocks.py in apply(self, func, **kwargs)
388 """
389 with np.errstate(all="ignore"):
--> 390 result = func(self.values, **kwargs)
391
392 if is_extension_array_dtype(result) and result.ndim > 1:
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\ops\array_ops.py in arithmetic_op(left, right, op, str_rep)
195 else:
196 with np.errstate(all="ignore"):
--> 197 res_values = na_arithmetic_op(lvalues, rvalues, op, str_rep)
198
199 return res_values
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\ops\array_ops.py in na_arithmetic_op(left, right, op, str_rep)
147
148 try:
--> 149 result = expressions.evaluate(op, str_rep, left, right)
150 except TypeError:
151 result = masked_arith_op(left, right, op)
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expressions.py in evaluate(op, op_str, a, b, use_numexpr)
206 use_numexpr = use_numexpr and _bool_arith_check(op_str, a, b)
207 if use_numexpr:
--> 208 return _evaluate(op, op_str, a, b)
209 return _evaluate_standard(op, op_str, a, b)
210
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expressions.py in _evaluate_numexpr(op, op_str, a, b)
112 f"a_value {op_str} b_value",
113 local_dict={"a_value": a_value, "b_value": b_value},
--> 114 casting="safe",
115 )
116
C:\ProgramData\Anaconda3\lib\site-packages\numexpr\necompiler.py in evaluate(ex, local_dict, global_dict, out, order, casting, **kwargs)
820 # Create a signature
821 signature = [(name, getType(arg)) for (name, arg) in
--> 822 zip(names, arguments)]
823
824 # Look up numexpr if possible.
C:\ProgramData\Anaconda3\lib\site-packages\numexpr\necompiler.py in <listcomp>(.0)
819
820 # Create a signature
--> 821 signature = [(name, getType(arg)) for (name, arg) in
822 zip(names, arguments)]
823
C:\ProgramData\Anaconda3\lib\site-packages\numexpr\necompiler.py in getType(a)
701 if kind == 'S':
702 return bytes
--> 703 raise ValueError("unknown type %s" % a.dtype.name)
704
705
ValueError: unknown type str32
---
Si me pueden ayudar se los agradezco,