how to remove certain columns from dataframe
I am just starting with python and pandas. I have a dataframe that looks like this:1 2.3 1 2.5 1 4.52 2.3 2 2.5 2 4.53 2.3 3 2.5 3 4.54 2.3 4 2.5 4 4.55 2.3 5 2.5 5 4.5I am trying to remove all the...
View ArticleI am getting an EOF when reading a line error. How do I fix this? [closed]
I have written a Python code snippet to find the smallest number among three input integers. However, when attempting to submit it, I encountered an "EOF when reading a line" error. Here is the...
View Articlepython program for turtle [closed]
Create a Python program that prompts users to provide questions, directing a turtle to draw based on their input. The program should be consistent, ensuring that certain inputs are interpreted...
View ArticleI am trying to build an AI image classifier, using a youtube guide. When I...
I am trying to build an AI image classifier using a youtube guide for a school project. Here is the link: https://www.youtube.com/watch?v=oEKg_jiV1Ng&t=727sAt this stage, I am not done, but when I...
View ArticleHow do I scrape a headline from a BBC article using Python and Beautiful Soup?
I've previously built a BBC scraper which, among other things, scrape the headline from a given article such as this. However, BBC has recently changed their website, so I need to modify my scraper,...
View ArticleIn Python, when are two objects the same?
It seems that 2 is 2 and 3 is 3 will always be true in python, and in general, any reference to an integer is the same as any other reference to the same integer. The same happens to None (i.e., None...
View ArticleHow to create citation, co-citation and bibliographic coupling networks in...
I am working currently in a small passion project to understand citation network.After some research, I came across three types of major citation analyses:direct citation, co-citation and bibliographic...
View ArticleHow is `2` different to `[2]` when using `is`? [duplicate]
a = 2b = 2print(b is a)a = [2]b = [2]print(b is a)The first print returns True and the second print returns False. Why is that?
View ArticleHow to parse and group hierarchical list items from an unindented string in...
Problem StatementGiven an unindented string as input, perform these steps:Identify the list items at the highest level of the hierarchy within the string.For each top-level item (identified by...
View ArticlePython app keeps OOM crashing on Pandas merge
I have a ligh Python app which should perform a very simple task, but keeps crashing due to OOM.What app should doLoads data from .parquet in to dataframeCalculate indicator using stockstats...
View ArticleFixed effect panel regression gives coefficients for each year
I am trying to use Entity fixed panel regression for my data set. I have cross sectional data for each county in the US and for 1971 to 2020 (yearly). I have two indices: STCTID which is county ID and...
View ArticleStopping code while the input line is running
I'm trying to write super simple code where I take input and print it.userInput = input('enter: ')print(userInput)The problem that I'm having is when I'm stopping code while the input line is running,...
View ArticleDie Basisadresse einer 64 Bit Anwendung mit Python auslesen [closed]
I would like to read and change the value of the following pointer, a 64 bit application using Python, how can I do this?
View ArticleMicrosoft graph, upload a large file (> 100 MB) with the Python SDK
I want to upload large file to a Sharepoint folder in Python. I'm using the msgraph-sdk-python.I found an example of what I want to do on the microsoft graph documentation but not in Python.On this...
View ArticleCan install asdf inside Docker container, but not at build time via Dockerfile
I have a Dockerfile in which I am trying to install and use asdf to manage Python package versions. A snippet of my Dockerfile appears below.SHELL ["/bin/bash", "-c"] RUN git clone...
View ArticlePython TCP Server that both sends and or receives data (independently) using...
I've a python-based TCP server using asyncio, but it has an specific behavior: The TCP client (a PLC) connects to the app, but actually both the server or the client can start data flows. Once the data...
View ArticleGetting Error: "ValueError: 2 is not in range" when working with Pandas
I have got this error when try split my one column to few columns. But it split on just on one or two columns.If you wanna split on 3,4,5 columns it writes:ValueError Traceback (most recent call...
View ArticleFailed to establish a new connection: [Errno 11001] getaddrinfo failed' in...
This script is used to send data to a 3rd party. It seems to run fine when connected to any network other than my work network. When connected to my work network, it will run for a few minutes,...
View ArticlePandas plot doesn't show
When using this in a script (not IPython), nothing happens, i.e. the plot window doesn't appear :import numpy as npimport pandas as pdts = pd.Series(np.random.randn(1000),...
View Articlescore predictor for students based on their historical performance and the...
Can u help me in designing a predictive algorithm to determine the target scores for students in class 12 based on their performance in classes 10 and 11. Given the test scores of students in class 10...
View Article