Category "python"

How do I replace missing values with NaN

I am using the IMDB dataset for machine learning, and it contains a lot of missing values which are entered as '\N'. Specifically in the StartYear column which

Solved: coloring cell in AG-Grid depending on it's content by using justpy web framework

I encountered a problem using AG-Grid in combination with justpy web framework. JustPy is an object-oriented, component based, high-level Python Web Framework t

Bytes object has not attribute json with requests

I am extracting BTC history data from a website and want to store these results. I want to run this in a function and then use map because it's much faster than

Adding markdown highlighted fenced block to django app with markdonx

I have been looking through the documentation but I can’t seem to get this to work. I wish to publish posts from a “creation page”. I want to

Is it possible to create frozen sets with curly braces?

It appears that one can only create a frozenset using the frozenset() constructor. Is this true or is there a textual way to create a frozen set? I can find no

Best way to activate my conda environment for a python script on a windows PC

I've made a python script for multiple users and I want to be able to run it by just double clicking the script. I also have made a conda env for this script an

Selenium won't load specific webpages on bet365

I am trying to scrape data from bet365 for basketball odds however I am encountering where certain leagues webpages wont load even when simply just loading the

predict function producing too high y values

hi can anyone tell me why my linear regression line is being displayed like https://imgur.com/gallery/u3L2avz. i reverted back to a previous version of my pytho

How to find any factory for identifier 'elasticsearch-7' that implements 'org.apache.flink.table.factories.DynamicTableFactory' in the classpath

I am trying to create a pyflink application with table API and elasticsearch as sink. from pyflink.table import TableEnvironment, EnvironmentSettings def log

BigQuery - Scheduled Query Error "PermissionDenied: 403 The caller does not have permission"

Having an issue with Scheduled Queries, using a python script, I get the error: "google.api_core.exceptions.PermissionDenied: 403 The caller does not have permi

django.core.exceptions.FieldError: Unknown field(s) (Actions) specified for Copyrightrece

I want to create 2 models in models.py and 2 forms in forms.py for webpage. but it shows unknown field error #models.py class Copyrightapp(models.Model): S

drop same values in different columns by pair (drop connected components)

after applying levenshtein distance algorithm I get a dataframe like this: Elemento_lista Item_ID Score idx ITEM_ID_Coincidencia 4 691776 100 5 691777 4 691776

crawl website with requests and problem is Object.setPrototypeOf

i'm trying to crawl website with python requests GET and having problem with Object.setPrototypeOf i added userAgent in header but it still gives me under code

Python: Dash, Plotly, and Jupyter Notebook: Use a WSGI server instead

First Stack Overflow question; please critique the request format if needed. I am working on some plotly image processing for my work. I have been using matplot

Convert simple expressions into JsonLogic format

Using python, I need to convert expressions into JsonLogic format. Expressions such as Boolean expressions, if else / ternary expressions, etc. Any suggestions

Selecting data from a pandas DataFrame

I have defined a pandas DataFrame, given the number of rows (index) and columns. I perform a series of operations and store the data in such DataFrame. The code

Value error in convolutional neural network due to data shape

I am trying to predict the of number peaks in time series data by using a CNN and keep on getting a data shape error. My data looks as follows: X = list of 520

DataFrame VWAP Does not match TradingView

Not sure why I cannot get my DataFrame VWAP calculations to TradingView version at this link: https://www.tradingview.com/support/solutions/43000502018-volume-w

WUnderground, Extraction of Extremes Today

As contributor to WUnderground not a problem to read via API-call the JSON-outputfile with Today's values for my station. That JSON-file has a series of numbere

Infer type from subclass method return type

I'm trying to infer a type from the returned type of a subclass method. So far I haven't been able to make this work without making Parent a generic class (whic