Question: Data: The data shows the XRD data of some materials. (4material.csv) Each line shows the XRD data of all the materials given a specific Intensity

Data: The data shows the XRD data of some materials. (4material.csv)

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.

Write the python code to get the answer of following tasks. Use python code to directly write the result to a file called result.txt. And save the plot to figure.png.

You need to use for/while loop to do all the counting.

Manual counting and writing will get 0 point.

We will run your code to generate the output files.

Tasks:

1. How many materials the data has?

2. How many missing values the data has? (missing value is represented as )

3. How many different Intensity the data has?

4. what is the frequency of 0 in this data?

5. What is average intensity?

6. What is the highest intensity?

7. What is the lowest intensity?

8. output all the above answers to the result.txt file

The file should look like:

Results of analysis:

How many materials the data has:xxx

How many missing values the data has:xxx

9. plot the XRD data of the material named AlNi5(missing value can be regarded as 0). Use plt.savefig() function

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!