Question: Python help! I am writing a program that reads an excel file to answer some questions. In the data sheet (attached image) each line shows

Python help! I am writing a program that reads an excel file to answer some questions. In the data sheet (attached image) each line shows the XRD data of all the materials given a specific Intensity (Arb. Units). AlNi* are the name of the materials. Each column shows the XRD data of one material. I attached a screen shot of the data and what i have done so far for other questions. These are the questions I need to answer. I know how to find an average using sum in python but am not sure how to do it with reading the excel file! Thank you!

What is average intensity?

What is the highest intensity?

What is the lowest intensity?

Python help! I am writing a program that reads an excel fileto answer some questions. In the data sheet (attached image) each line

from math import * file-open("4material.csv","r") lines-file. readlines) # print(lines) attributes-lines [0] . strip ( ) . split (", ") mapA2Index-th index-0 for x in attributes1:] index+-1 spacecount-0 for line in lines [1:]: ) materials-Line. strip( ) . split ( for data in materials [1:]: check-data.strip() if check.isspace(): spacecount++1 elif len (check.split()) spacecount+1 intensitycount-0 for Line in LineSL1: intensitycount+1 zerocount-0 for line in lines [1:]: materials-line.strip().split(',') for data in materials [1:]: check-data.strip() if check"0": zerocount+-1 print("How many materials the data has:", index) print("How many missing values the data has:", spacecount) print("How many different intensities the data has:", intensitycount) print "How many zeros the data has:", zerocount)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!