User Tools

Site Tools


renamer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

renamer [2016/10/07 16:00]
vincenzo created
renamer [2016/11/24 10:45] (current)
vincenzo
Line 8: Line 8:
 df['​Device_Type'​].apply(matchtype) df['​Device_Type'​].apply(matchtype)
 </​code>​ </​code>​
 +
 +with **nan** check
 +<code python>
 +def define_segment(x):​
 +    if pd.isnull(x) == True:
 +        return '​segment_1'​
 +    else:
 +        return '​segment_2'​
 +
 +df['​doi'​] = df['​doi'​].apply(define_segment)
 +</​code>​
 +
renamer.txt ยท Last modified: 2016/11/24 10:45 by vincenzo