Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Is there anyway that can run python scripts to automate apply query step. like changed type, replace value. thank you.
Hi, @ndn_nualkeaw
The following is a simple example of how to replace values in a column using a Python script:
# Replace values in a column using Python
import pandas as pd
# Input DataFrame
df = pd.DataFrame({
'Column1': ['A', 'B', 'C', 'D', 'E']
})
# Replace values in Column1
df['Column1'] = df['Column1'].replace({'A': 'X', 'B': 'Y'})
# Return the transformed DataFrame
df
Best Regards,
hackcrr
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
85 | |
83 | |
66 | |
61 | |
58 |
User | Count |
---|---|
194 | |
111 | |
105 | |
79 | |
71 |