Forum Discussion
Anonymous
7 years agoNot applicable
Python script is not working with Regex contains "|" or "*"
Appreciate for your help in advance. I built regex based text extract codes to extract the timestamp information from freetext. # 'dataset' holds the input data for this script regex = r'((...
Anonymous
7 years agoNot applicable
Hi v-piga-msft Cherry,
Thanks for looking into my issue. The Python script is correct, if I use is for a simple regex pattern. Like the below one.
# 'dataset' holds the input data for this script
regex = r'(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2})'
dataset['Timestamp'] = dataset['description'].str.extract(regex)
So, it is only not working when the regex become complex somehow. Does POWER BI offers any native filter option based on the regex, then the Python script is not really necessary.
brightcitrus
6 years agoFrequent Visitor
Hi Anonymous v-piga-msft,
I am having the same issue using a Python script with regular expressions in Power BI. Did you find a solution to run the script? Please let me know. You can also reply to my post here. Thank you!