csv

Attempting to download a .csv via a link on within a page w/ python

Attempting to download a .csv via a link on within a page w/ python Question: I’m attempting to download and use data contained in a .csv file. I’m pretty amatuer at scraping or most things coding related and would appreciate any help. Is it possible I’m being blocked from pulling the link from the website? …

Total answers: 1

Why can't I separate my date-time column properly using pandas in python?

Why can't I separate my date-time column properly using pandas in python? Question: I have never asked a question here before but I am in need of help. I am trying to separate my date column from my csv file from the form of ’12/10/2022 11:45:12.446 +0200′ to a column for date and a column …

Total answers: 1

NoneType' object is not subscriptable : bs4 task fails permanently

NoneType' object is not subscriptable : bs4 task fails permanently Question: update: tried the scripts of Driftr95 .. in google-colab – and got some questions – the scripts failed – and was not succesful – queston. at the beginning of the scripts i have noticed that some lines are commendted out. why is this so. …

Total answers: 2

Convert non-tabular, comma-separated data to pydantic

Convert non-tabular, comma-separated data to pydantic Question: I have a "special" csv file in the following format: A;ItemText;1;2 B;1;1.23,99 B;2;9.52,100 C;false I would like to convert this data into pydantic models. Currently I subclassed the FieldInfo class: class CSVFieldInfo(FieldInfo): def __init__(self, **kwargs: Any): self.position = kwargs["position"] if not isinstance(self.position, int): raise ValueError("Position should be integer, …

Total answers: 1

Have Python output .csv with space-padded, fixed width, but comma-separated columns?

Have Python output .csv with space-padded, fixed width, but comma-separated columns? Question: Let’s say I have CSV data as note below; let’s call this original.csv: name,value1,value2 firstname,34326408129478932874,553 secondname_a_very_long_one,65,123987 thirdname_medium,9686509933423,33 Basically, it’s either single word text (no space separation, so no need for quoting) or numbers (here integers, but could be floats with decimals or scientific …

Total answers: 1

The utf-8 encoding does not work correctly

The utf-8 encoding does not work correctly Question: I am making a programme to visualise reports in HTML. It’s nothing complicated, I read the CSV file added some style(for text and table) some text and read the DF as a table. This is how code looks like: df = pd.read_csv("Średnie wyniki oceny użytkowości rozpłodowej loch …

Total answers: 1

Python: Read Csv files one by one in a folder and save output as png file

Python: Read Csv files one by one in a folder and save output as png file Question: I have a folder with 50 csv files like countrieslist1.csv,countrieslist2.csv, countrieslist3.csv and so on. I have a code where I can read the values from a csv file using pandas and plot the required graph from the data …

Total answers: 3