You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							30 lines
						
					
					
						
							515 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							30 lines
						
					
					
						
							515 B
						
					
					
				| # -*- coding: utf-8 -*- | |
| 
 | |
| """ | |
| @Time    :  2023/1/4 21:25 | |
| @Author  :  | |
| @FileName:  | |
| @Software:  | |
| @Describe: | |
| """ | |
| import pandas as pd | |
| 
 | |
| path = "data/reducesourceandresult.txt" | |
| 
 | |
| 
 | |
| data = [] | |
| with open(path,'r',encoding="utf-8") as f: | |
|     for line in f: | |
|         data.append(line) | |
| 
 | |
| text = "".join(data) | |
| data = text.split("\n\n") | |
| print(data) | |
| 
 | |
| 
 | |
| data_new = [] | |
| for i in data: | |
|     dan = i.split("\n") | |
|     data_new.append(dan) | |
| 
 | |
| pd.DataFrame(data_new,columns=["原文","yy数据"]).to_excel("data/700条论文测试.xlsx", index=None)
 | |
| 
 |