Skip to content
Advertisement

Tag: python

How to get data from excel file ‘as is’ using openpyxl?

I have an excel file – the data in which looks like. I want to get float values ​​of cells – in which separator is comma. But when accessing them, a value with a dot is returned. Is it possible to do this with opepyxl or other libraries? what i tried I also tried pandas, but it also formats cells

Pytest retry logic upon one unsuccessful test

In my pytest suite, I run plenty of iOS UI tests. Which comes with plenty of frustrating issues. Im experimenting with the use of a hook based retry logic. Essentially, I have a pytest_runtest_call hook, where I collect the output of a test via a yield, and do extra processing with that data. Based on the failed output of the

Why can’t I save my scraped html table to pandas dataframe?

I have a python script that scrapes a html table. When I try to save my scraped data to pandas dataframe, I get an error. Please help me check what am doing wrong? Here is my codeblock Here is the error i get I want to save the above scraped values into pandas dataframe. That’s my aim. Please help if

Python : optimization/multiple if then on less lanes?

I’m trying some optimisation on my code and I struggle with multiple if then statements. The point is to update SQL database with psycopg2 and I must set some variables with “None” to be “null” in SQL. If I do if/elif/elif, the script will leave on the first valid condition but I want every condition to be checked, here is

Polars: settings not to display ellipsis

Polars chops some text instead of showing all text like the following Link Name https://… name1 https://… name2 I want Polars to show all text of Link Col How can I do that? Answer You should change pl.Config() settings – pl.Config.set_fmt_str_lengths(n) (see doc) If you just want to check, how new table view looks like, you can use with pl.Config()

Can’t create superuser in Django using custom user

I got this error when i try to run manage.py createsuperuser TypeError: UserManager.create_superuser() missing 1 required positional argument: ‘username’ My User model: and in my settings.py file: How can i solve this? Im new in Django, documentation is confused to me… I already tried remove AUTH_USER_MODEL = ‘usuarios.User’ or remove username attribute from class User Answer To create superuser with

Advertisement