Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hola
No puedo entender esto. Estoy usando Python en Power BI para hacer alguna manipulación de datos. Mi guión funciona bien en el cuaderno de Jupyter. Además, se ejecuta bien en Power BI hasta que realice una asignación de columna:
# Not a lot of code to get to this point
progress = df_installed.apply(lambda x: running_pct(x, deployment_totals), axis = 1)
# progress is a pd.Series with 141 float64 values
df_installed["Progress"] = progress
# If I comment this last line out, the script runs fine, but when I do the assignment, I get the error.
DataSource.Error: ADO.NET: error de script de Python.
Traceback (última llamada más reciente):
Archivo "C:-Usuarios-usuario-esl-lib-paquetes-sitio-pandas-core-indexes-base.py", línea 2646, en get_loc
devolver self._engine.get_loc(clave)
Archivo "pandas-_libs-index.pyx", línea 111, en pandas._libs.index.IndexEngine.get_loc
Archivo "pandas-_libs-index.pyx", línea 138, en pandas._libs.index.IndexEngine.get_loc
Archivo "pandas-_libs-hashtable_class_helper.pxi", línea 1619, en pandas._libs.hashtable.PyObjectHashTable.get_item
Archivo "pandas-_libs-hashtable_class_helper.pxi", línea 1627, en pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Progreso'
Durante el control de la excepción anterior, se produjo otra excepción:
Traceback (última llamada más reciente):
Archivo "C:-Usuarios-usuario-esl-lib-paquetes-sitio-pandas-core-internals-managers.py", línea 1071, en el conjunto
loc á self.items.get_loc(item)
Archivo "C:-Usuarios-usuario-esl-lib-paquetes-sitio-pandas-core-indexes-base.py", línea 2648, en get_loc
retorno self._engine.get_loc(self._maybe_cast_indexer(key))
Archivo "pandas-_libs-index.pyx", línea 111, en pandas._libs.index.IndexEngine.get_loc
Archivo "pandas-_libs-index.pyx", línea 138, en pandas._libs.index.IndexEngine.get_loc
Archivo "pandas-_libs-hashtable_class_helper.pxi", línea 1619, en pandas._libs.hashtable.PyObjectHashTable.get_item
Archivo "pandas-_libs-hashtable_class_helper.pxi", línea 1627, en pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Progreso'
Durante el control de la excepción anterior, se produjo otra excepción:
Traceback (última llamada más reciente):
Archivo "PythonScriptWrapper.PY", línea 30, en <module>
df_installed["Progreso"] - Progreso
Archivo "C:-Usuarios-usuario-esl-lib-paquetes-sitio-pandas-core-frame.py", línea 2938, en __setitem__
self._set_item(clave, valor)
Archivo "C:-Usuarios-usuario-esl-lib-paquetes-sitio-pandas-core-frame.py", línea 3001, en _set_item
NDFrame._set_item(self, key, value)
Archivo "C:-Usuarios-usuario-esl-lib-paquetes-sitio-pandas-core-generic.py", línea 3624, en _set_item
self._data.set(clave, valor)
Archivo "C:-Usuarios-usuario-esl-lib-paquetes-sitio-pandas-core-internals-managers.py", línea 1074, en el conjunto
self.insert(len(self.items), item, value)
Archivo "C:-Usuarios-usuario-esl-lib-paquetes-sitio-pandas-core-internals-managers.py", línea 1181, en la inserción
bloque de make_block (valores-valor, ndim-self.ndim, placement-slice(loc, loc + 1))
Archivo "C:-Usuarios-usuario-esl-lib-paquetes-sitio-pandas-core-internals-blocks.py", línea 3053, en make_block
devolver klass(valores, ndim-ndim, placement-placement)
Archivo "C:-Usuarios-usuario-esl-lib-paquetes-sitio-pandas-core-internals-blocks.py", línea 124, en __init__
elevar ValueError(
ValueError: Número incorrecto de elementos pasados 3, la colocación implica 1
Detalles:
DataSourceKind-Python
DataSourcePath-Python
Error de secuencia de comandos Message-Python.
Traceback (última llamada más reciente):
Archivo "C:-Usuarios-usuario-esl-lib-paquetes-sitio-pandas-core-indexes-base.py", línea 2646, en get_loc
devolver self._engine.get_loc(clave)
Archivo "pandas-_libs-index.pyx", línea 111, en pandas._libs.index.IndexEngine.get_loc
Archivo "pandas-_libs-index.pyx", línea 138, en pandas._libs.index.IndexEngine.get_loc
Archivo "pandas-_libs-hashtable_class_helper.pxi", línea 1619, en pandas._libs.hashtable.PyObjectHashTable.get_item
Archivo "pandas-_libs-hashtable_class_helper.pxi", línea 1627, en pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Progreso'
Durante el control de la excepción anterior, se produjo otra excepción:
Traceback (última llamada más reciente):
Archivo "C:-Usuarios-usuario-esl-lib-paquetes-sitio-pandas-core-internals-managers.py", línea 1071, en el conjunto
loc á self.items.get_loc(item)
Archivo "C:-Usuarios-usuario-esl-lib-paquetes-sitio-pandas-core-indexes-base.py", línea 2648, en get_loc
retorno self._engine.get_loc(self._maybe_cast_in...
ErrorCode-2147467259
ExceptionType-Microsoft.PowerBI.Scripting.Python.Exceptions.PythonScriptRuntimeException
Hola @jumarinb ,
Por favor refiérase al caso.
Microsoft.PowerBI.Scripting.Python.Exceptions.PythonScriptRuntimeException-Transforming data python
Saludos
Lionel Chen
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.