Skip to content

Kivy – Error while trying to use my.kv file

I’ve just started learning kivy and I am unable to get a black window when I run this code, and this is an error: Kivy files require #:kivy !ex This is my code snippet: gui_python.py My my.kv file is: Answer I use Builder.load_string() and paste my .kv code in it and that’s work

Multiple dates in a pandas column

I am trying to make the dates in a Pandas DataFrame all of the same format. Currently I have the DataFrame storing the dates in two formats. “6/08/2017 2:15:00 AM” & 2016-01-01T00:05:00 The column name which these dates are stored under is INTERVAL_END. As you can see, one of the dates is a st…

Finding difference in day between today’s date and a entered date

I am currently trying to construct a function that takes a date string and returns the number of days from that date until now. It will return 0 if it detects that the format is wrong, with the input date string format being Day/Month/Year (e.g. 12/3/21). The number should be negative if it is a past date (e.…

Values in Python lists getting overwritten

I am calculating some values for a certain type of matrix A of varying sizes. Namely the backward error, forward error, condition number, and the error magnification (everything with the infinity norm). My values get calculated and then I am trying to put them into lists, looping through increasing sizes of t…

Using Decompose to remove empty tag

I am trying to search for emails in HTML elements. I want to run the code so that when there are no emails found in the HTML, to search in another element in the HTML and in the end if it is not found to set email as “N/A”. I am new to writing code and I am trying to

Multiple XML files in directory Python

I am fairly new to Python and this community has been a great help! I am learning a lot. I’m trying to use this existing code to loop through multiple XML files in the same directory. Currently, the code is looking at one specific file. Any help is greatly appreciated! Answer This should help you…