update
This commit is contained in:
		
							parent
							
								
									1ac2923e92
								
							
						
					
					
						commit
						f5a433c43d
					
				
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -902,6 +902,33 @@ The basic indexable objects are
 | 
			
		||||
     ```
 | 
			
		||||
     \normalsize
 | 
			
		||||
 | 
			
		||||
## 
 | 
			
		||||
 | 
			
		||||
\setbeamertemplate{itemize item}{\color{red}\tiny$\blacksquare$}
 | 
			
		||||
 | 
			
		||||
* Selecting data of pandas objects continued
 | 
			
		||||
 | 
			
		||||
   \vspace{0.5cm}
 | 
			
		||||
 | 
			
		||||
   * More operations 
 | 
			
		||||
 | 
			
		||||
     \footnotesize
 | 
			
		||||
 | 
			
		||||
     ```python
 | 
			
		||||
     df.drop(['col1', 'col2'], axis=1)  # removes columns 'col1' and 'col2'
 | 
			
		||||
     df.fillna(0)                       # fills missing values with 0
 | 
			
		||||
     df.fillna(method='ffill')          # fills missing values with previous 
 | 
			
		||||
                                        # non-missing value in the column
 | 
			
		||||
     df.replace('old_val', 'new_val')   # replaces 'old_val' with 'new_val'
 | 
			
		||||
     df.groupby('col1').mean()          # groups by 'col1' and computes
 | 
			
		||||
                                        # the mean of each group
 | 
			
		||||
     pd.merge(df1, df2, on='column1')   # merges df1 and df2 on 'column1'
 | 
			
		||||
     df['column1'].value_counts()       # counts the number of occurrences
 | 
			
		||||
                                        # of each unique value in 'column'
 | 
			
		||||
     ```
 | 
			
		||||
     \normalsize
 | 
			
		||||
 | 
			
		||||
   \vspace{3cm}
 | 
			
		||||
 | 
			
		||||
##  Pandas - plotting data
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user