
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
import pandas as pd
import matplotlib.pyplot as plt
dengue = pd.read_excel('Dengue.xlsx', header=0, index_col='Date', parse_dates=True, squeeze=True)
reg = dengue['Total']
reg = reg.reset_index()
reg.hist(bins = 100)
plt.grid(False)
plt.show()
![import pandas as pd
import matplotlib.pyplot as plt
dengue = pd.read_excel('Dengue.xlsx', header=0, index_col='Date' parse dates=True, squeeze=True)
dengue['Total']
reg =
reg = reg.reset_index()
reg.hist(bins = 100)
plt.grid(False)
plt.show()
FileNotFoundError
Traceback (most recent call last)
<ipython-input-6-453415c79af5> in <module>()
2 import matplotlib.pyplot as plt
3
----> 4 dengue = pd.read_excel('Dengue.xlsx', header=0, index_col='Date', parse_dates=True, squeeze=True)
%3D
5 reg = dengue['Total']
6 reg = reg.reset_index()
6 frames
ex in open_workbook (filename, logfile, verbosity, use_mmap, file_contents, encoding_override,
/usr/local/lib/python3.7/dist-packages/xlrd/ init
formatting_info, on_demand, ragged_rows)
peek = file_contents[:peeksz]
114
115
else:
--> 116
with open(filename, "rb") as f:
peek = f.read(peeksz)
if peek == b"PK\xe3\x04": # a ZIP file
117
118
FileNotFoundError: [Errno 2] No such file or directory: 'Dengue.xlsx'](https://content.bartleby.com/qna-images/question/42e81c87-cbe3-4b02-92da-b0c2f3901ee4/1d8fc9d6-09cf-427c-8d93-edf9c49cd35d/n3gtg8_thumbnail.jpeg)
Transcribed Image Text:import pandas as pd
import matplotlib.pyplot as plt
dengue = pd.read_excel('Dengue.xlsx', header=0, index_col='Date' parse dates=True, squeeze=True)
dengue['Total']
reg =
reg = reg.reset_index()
reg.hist(bins = 100)
plt.grid(False)
plt.show()
FileNotFoundError
Traceback (most recent call last)
<ipython-input-6-453415c79af5> in <module>()
2 import matplotlib.pyplot as plt
3
----> 4 dengue = pd.read_excel('Dengue.xlsx', header=0, index_col='Date', parse_dates=True, squeeze=True)
%3D
5 reg = dengue['Total']
6 reg = reg.reset_index()
6 frames
ex in open_workbook (filename, logfile, verbosity, use_mmap, file_contents, encoding_override,
/usr/local/lib/python3.7/dist-packages/xlrd/ init
formatting_info, on_demand, ragged_rows)
peek = file_contents[:peeksz]
114
115
else:
--> 116
with open(filename, "rb") as f:
peek = f.read(peeksz)
if peek == b"PK\xe3\x04": # a ZIP file
117
118
FileNotFoundError: [Errno 2] No such file or directory: 'Dengue.xlsx'
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Please help me with my code in python. Can you change the start_tag and end_tag to strip. Since we have not discussed anything about tag yet. Thank you def read_data(): with open("simple.xml", "r") as file: content = file.read() return content def extract_data(tag, string): data = [] start_tag = f"<{tag}>" end_tag = f"</{tag}>" while start_tag in string: start_index = string.find(start_tag) + len(start_tag) end_index = string.find(end_tag) value = string[start_index:end_index] data.append(value) string = string[end_index + len(end_tag):] return data def get_names(string): names = extract_data("name", string) return names def get_calories(string): calories = extract_data("calories", string) return calories def get_descriptions(string): descriptions = extract_data("description", string) return descriptions def get_prices(string): prices = extract_data("price", string) return prices def…arrow_forwardHere is my entire code(average is not working yet). The response I got from the professor is that I have to create a DRY solution replacing the five display_functions with a single get_array function you call five times like common_array = get_array(plant_xml, "COMMON") etc. from urllib.request import urlopenfrom xml.etree.ElementTree import parse def read_data(data_file): plant_url = urlopen(data_file) plant_xml = parse(plant_url) return plant_xml def display_common_items(plant_xml): plant_root = plant_xml.getroot() common_array = [] for item in plant_root.findall("PLANT"): common_array.append(item.find("COMMON").text) return common_array def display_botanical_items(plant_xml): plant_root = plant_xml.getroot() botanical_array = [] for item in plant_root.findall("PLANT"): botanical_array.append(item.find("BOTANICAL").text) return botanical_array def display_zone_items(plant_xml): plant_root = plant_xml.getroot() zone_array = []…arrow_forwardA tuple that contains elements is true. True or false? In Python.arrow_forward
- Revorse the vewels def reverse_vowels(text): Given a text string, create and return a new string constructed by finding all its vowels (for simplicity, in this problem vowels are the letters found in the string 'aeiouAEIOU') and reversing their order, while keeping all other characters exactly as they were in their original positions. However, to make the result look prettier, the capitalization of each moved vowel must be the same as that of the vowel that was originally in the target position. For example, reversing the vowels of 'Ilkka' should produce 'Alkki' instead of 'alkkI'. Applying this operation to random English sentences seems to occasionally give them a curious pseudo-Mediterranean vibe.Along with many possible other ways to perform this square dance, one straightforward way to reverse the vowels starts with collecting all vowels of text into a separate list, and initializing the result to an empty string. After that, iterate through all positions of the original text.…arrow_forwardDesign a class that acquires the JSON string from question #1 and converts it to a class data member dictionary. Your class produces data sorted by key or value but not both. Provide searching by key capabilities to your class. Provide string functionality to convert the dictionary back into a JSON string. question #1: import requestsfrom bs4 import BeautifulSoupimport json class WebScraping: def __init__(self,url): self.url = url self.response = requests.get(self.url) self.soup = BeautifulSoup(self.response.text, 'html.parser') def extract_data(self): data = [] lines = self.response.text.splitlines()[57:] # Skip the first 57 lines for line in lines: if line.startswith('#'): # Skip comment lines continue values = line.split() row = { 'year': int(values[0]), 'month': int(values[1]), 'decimal_date': float(values[2]),…arrow_forwardQ1. Implement a SnapshotArray that supports the following interface: SnapshotArray(int length) initializes an array-like data structure with the given length. Initially, each element equals 0. void set(index, val) sets the element at the given index to be equal to val. int snap() takes a snapshot of the array and returns the snap_id: the total number of times we called snap() minus 1. int get(index, snap_id) returns the value at the given index, at the time we took the snapshot with the given snap_id Example 1: Input: ["SnapshotArray","set","snap","set","get"] [[3],[0,5],[],[0,6],[0,0]] Output: [null,null,0,null,5] Explanation: SnapshotArray snapshotArr = new SnapshotArray(3); // set the length to be 3 snapshotArr.set(0,5); // Set array[0] = 5 snapshotArr.snap(); // Take a snapshot, return snap_id = 0 snapshotArr.set(0,6); snapshotArr.get(0,0); // Get the value of array[0] with snap_id = 0, return 5..arrow_forward
- In python: student_dict is a dictionary with students' name and pedometer reading pairs. A new student is read from input and added into student_dict. For each student in student_dict, output the student's name, followed by "'s pedometer reading: ", and the student's pedometer reading. Then, assign average_value with the average of all the pedometer readings in student_dict..arrow_forwardin c++ codearrow_forwardUsing Go, return a Movie with the given title and genre. The Views, Likes, and Dislikes should all be left in their zero-vale states. type Movie struct { Title string Genre string Likes int Dislikes int Views int } func NewMovie(title, genre string) *Movie { return &Movie { } }arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education