I am brand new to coding, and was given a web scraping tutorial (found here) to help build my skills as I learn. I’ve already had to make several adjustments to the code in this tutorial, but I digress. I’m scraping off of http://books.toscrape.com/ and, when I try to export a Dataframe of just the book categories into Excel, I
Tag: jupyter
How to increase the size of only one plot in subplots?
If you have two subplots, how do you change the length of only the second plot? Adding figsize=(7,5) to plt.subplots changes the size of both plots, but hoping to change only the size of the 2nd one. source code: https://www.w3schools.com/python/matplotlib_subplot.asp There are no errors, but how do you adjust the size of only the 2nd plot but keeping the placement
How do I plot a histogram with one of the columns along the x axis?
I have a DataFrame quantities as follows: How do I make a histogram out of it with date along x axis, total quantity for the date on y axis? I tried But the resulting histogram didn’t make any sense to me. Edit. Long day. I got it all wrong. Per comments, it looks like I what I need is a
Gams_magic does not work in Jupyter notebook and returns ModuleNotFoundError
I just wanted to use gams inside Jupyter notebook in order to use data frames of pandas in gams codes. I followed the instructions of this page to get started with the gams in Jupyter. However, I can not call gams and when I run this line I get the following error: I really do not know where is the
Encoding German Character in Jupyter Notebook [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 8 months ago. Improve this question
Sum values of a coulmn in specific rows in a dataframe
I would like to learn how to specify a “subset-sum” in a dataframe My dataframe looks like this: The Data/Time column is the dataframes’ index With I get the total sum of column A. My aim is to sum up a subset of rows only like between 2022-03-18 07:37:51 and 2022-03-18 07:37:55 so that I get a “sum” row: How
Python Plotly chart update with two dropdowns
I am trying to build a plotly scatterplot in Jupyter Lab to be able to see dependencies between various columns in a DataFrame. I want to have two dropdown menus (corresponding to the X and Y axes), in each of which a full list of the DF columns will be available. When I select a column in any of the
Why is pd.to_datetime() only changing type if utc is True?
After loading my csv file into my notebook in VS Code i wanted to change the columns type from object to datetime for some columns. So i did the following: object values of columns These are example values in the columns. check convert check After converting the columns i wanted to check if everything worked out fine. This is strange.
Jupyter notebook in blank when initiating a notebook – remote desktop
I’m trying to run jupyter notebook on a remote desktop, which is highly secured (i.e. I had to activate scripting on internet explorer to be able to log in into outlook). I am really new to this remote desktop thing and I would like to know why is this happening and if it has a solution. As a finance student,
How can I display dates on the x axis in matplotlib?
I have daily data from 1994 Jan 1st – 2000 April 30th. I have the dates in datetime format, but when I plot a line plot with time on the x axis and the variable on the y axis, matplotlib prints out way too much on the x axis. How do I fix this issue with plotting dates? I have