How to create a folder, if its not existing already
SUCCESS: reading input data "#1"
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\pandas\core\indexes\base.py in get_loc(self, key, method, tolerance) 2656 try: -> 2657 return self._engine.get_loc(key) 2658 except KeyError: pandas\_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas\_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item() pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item() KeyError: 'networkpath' During handling of the above exception, another exception occurred: KeyError Traceback (most recent call last) <ipython-input-2-46de07459b84> in <module> 3 from pandas import DataFrame 4 df=Alteryx.read("#1") ----> 5 path=df["network Path"][0] 6 7 try: c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\pandas\core\frame.py in __getitem__(self, key) 2925 if self.columns.nlevels > 1: 2926 return self._getitem_multilevel(key) -> 2927 indexer = self.columns.get_loc(key) 2928 if is_integer(indexer): 2929 indexer = [indexer] c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\pandas\core\indexes\base.py in get_loc(self, key, method, tolerance) 2657 return self._engine.get_loc(key) 2658 except KeyError: -> 2659 return self._engine.get_loc(self._maybe_cast_indexer(key)) 2660 indexer = self.get_indexer([key], method=method, tolerance=tolerance) 2661 if indexer.ndim > 1 or indexer.size > 1: pandas\_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas\_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item() pandas\_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item() KeyError: 'NetworkPath'
send me your workflow
Hi @Pravallika20 .. i have attached sample workflow... i have given dummy value for path
Hi @vencric ,
You need to give the exact column name in the last line in the python code i.e path= df["Field1"][0]. Since it is Field1 in the workflow you have sent, it should be the same
hi @Pravallika20 .. what details should that column contain
Hi @vencric
The path which you want is enough
Actually i passed the path only, just for uploading purpose i made it a dummy variable
Hi @atcodedog05 , how to check if 5C, is present in LC5A.. if i use REGEX_Countmatches, it showing true, because it has C5, instead
Hi @vencric
You can use contains function like Contains([Field1], "5C"). And can you share your regex function as far I know regex should also work might need some tweaking.
Hope this helps : )
Hi @atcodedog05 this is the function i used..
REGEX_CountMatches([Part Prefix], "B5|1M|C5|2C|3U|Z8|Z9|J9|K9
").. part prefix is the column where it wil have many words, like
DSLC5B
ESLC5B
ILLC5B
LB5B
Here it should return True condition only for LB5B.. where its returning true for all the above records