User Tools

Site Tools


get_first_element_of_series_if_not_empty

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
get_first_element_of_series_if_not_empty [2021/01/16 07:41] – [get first element of series if not empty] rajuget_first_element_of_series_if_not_empty [2021/01/17 02:01] – [Issue] raju
Line 12: Line 12:
 df.loc[mask]['C'].iloc[0] df.loc[mask]['C'].iloc[0]
 </code> </code>
-since iloc[0] will throw the exception+since iloc[0] will throw
 <code> <code>
 IndexError: single positional indexer is out-of-bounds IndexError: single positional indexer is out-of-bounds
 </code> </code>
-if df.loc[mask] is empty.+exception if df.loc[mask] is empty.
  
 For example For example
get_first_element_of_series_if_not_empty.txt · Last modified: 2021/01/17 02:04 by raju