Added pandas code for log analysis and refactoring code