How to fix FileNotFoundError

The function takes a list of paths to all folders and checks if it is empty. If empty, it deletes. But after she deleted the folder, the error FileNotFoundError: [WinError 3] The system cannot find the path specified: ‘\\Projects\\Example\\New folder’ appears. I do not fully understand why it is looking for it after deletion. And… Read More How to fix FileNotFoundError

How to concatente a list of csv (including empty ones) using Pandas

I have a list of .csv files stored in a local folder and I’m trying to concatenate them into one single dataframe. Here is the code I’m using : import pandas as pd import os folder = r’C:\Users\_M92\Desktop\myFolder’ df = pd.concat([pd.read_csv(os.path.join(folder, f), delimiter=’;’) for f in os.listdir(folder)]) display(df) Only one problem, it happens that one… Read More How to concatente a list of csv (including empty ones) using Pandas

Obtaining the number of files based on the extension and folder you give it in the function

I want to design a function as follows: explore("jpg", "../test_media") outputsample: {‘../test_media’:1,’../test_media/travel_photos’:3} That is, the output of the function should be a dictionary where each key is the address of a folder and each value is the number of files with that extension directly in that folder. If a folder does not contain the file… Read More Obtaining the number of files based on the extension and folder you give it in the function

How do I make it so that processes are created parallel to each other rather than one after another?

I need help in modifying this code. Right now, it creates a process, and then waits for its termination. After which, another process is created, and then it waits for its termination. I want to modify it so that it creates both processes at the same time and executes them parallel to each other. The… Read More How do I make it so that processes are created parallel to each other rather than one after another?

Decrementing Initialization of a For Loop (C) – EX: for(i–; i>0; i–)

I have been reading about operating system design in the book, "The Xinu Approach 2nd Ed.", and came across a for loop statement in chapter 10 on page 182/183. The for loop starts off decrementing the initialization statement of the for loop. I hadn’t seen this before, so I created my own version of this… Read More Decrementing Initialization of a For Loop (C) – EX: for(i–; i>0; i–)