spyder

NoneType object is not callable error on a full dictionary, stackoverflow fatal error

NoneType object is not callable error on a full dictionary, stackoverflow fatal error Question: Im trying to make a web-scraping script. I’m bumping into an error and cant seem to figure out why. I’m using spyder IDE, so all the variables are shown in variable explorer. My code is as follows from urllib.request import Request, …

Total answers: 2

Coloring data sets with two colors in Spyder(Python 3.9)

Coloring data sets with two colors in Spyder(Python 3.9) Question: I have a dataset with 569 data points, each associated with two features and labelled either as 0 0r 1. Based on the label, I want to make a scatterplot graph such that data point associated with label 0 gets a green dot while the …

Total answers: 1

Python 3.9.12: f-string error – SyntaxError: invalid syntax

Python 3.9.12: f-string error – SyntaxError: invalid syntax Question: I am using Spyder with Python 3.9.12 Here is the code I have inside Spyder: user_input = (input(‘Please enter a number between 1 and 12:>>’ )) while (not user_input.isdigit()) or (int(user_input) < 1 or int(user_input) > 12): print(‘Must be an integer between 1 and 12’) user_input …

Total answers: 1

Spyder IDE with python 3.10 seems freezing when click run button, but it works fine if run a single line beforehand running the entire script

Spyder IDE with python 3.10 seems freezing when click run button, but it works fine if run a single line beforehand running the entire script Question: I have truble with last version of Spyder 5.4.0 with last version of Python 3.10.6. Spyder version: 5.4.0 (conda) Python version: 3.10.6 64-bit Qt version: 5.15.2 PyQt5 version: 5.15.7 …

Total answers: 1

How do I take the average (mean) of inputted numbers in Python?

How do I take the average (mean) of inputted numbers in Python? Question: I would like to take create a code that takes an input of numbers, and then takes the average (mean) of these numbers. So far, I have this: from statistics import mean numbers=int(input("Enter some numbers. Seperate each number by a space: ") …

Total answers: 4

what is the easest way to solve indentation problem in spyder 5.3.3

what is the easest way to solve indentation problem in spyder 5.3.3 Question: I am using spyder 5.3.3 for python coding. I copied the code from some sources,it works fine. But when I make edits in it, I get indentation error. Asked By: A Y || Source Answers: In case of copy codes from different …

Total answers: 1

unexpected output with pandas merge_asof (missing rows)

unexpected output with pandas merge_asof (missing rows) Question: I want to merge the two data frames based on the nearest timestamp, the case is as following Time stamp Value1 Time Stamp 2 Value 2 13:30 A 13:32 40 13:30 B 13:30 C 13:30 D 13:30 E 13:30 F the above is the dataframe where value …

Total answers: 1