Jan-03-2020, 04:19 PM
(This post was last modified: Jan-03-2020, 04:19 PM by eddywinch82.)
Hi GANGA SANDEEP KUMAR,
Many thanks for your help, where do I need to put the Code you show, in my Python Code ?
I put it in the following Order in my Python Code :-
Regards
Eddie Winch
Many thanks for your help, where do I need to put the Code you show, in my Python Code ?
I put it in the following Order in my Python Code :-
def sorted_string(s): return ''.join(sorted(s)) def remove_duplicate_chars(s): return ''.join(set(s)) aircraft = aircraft.apply(remove_duplicate_chars) print(aircraft.unique().tolist()) indexNames = df[~df['A/C'].str.contains('D')].index df.drop(indexNames , inplace=True) print(df)#prints all having D and removes remaining rows df1=pandas.DataFrame(df) indexNames1 = df1[~df1['A/C'].str.match('DL')].index df1.drop(indexNames1 , inplace=True) print(df1)#for the filtered df, now it show for matching word DL pd.DataFrame(aircraft) #print(aircraft.shape)But I get the following Error Traceback :-
Error:TypeError: bad operand type for unary ~: 'float'
Do you know, what is causing that Error Message ?Regards
Eddie Winch