Skip to main content

All Questions

Tagged with
0 votes
1 answer
81 views

JSONDecodeError when trying to read and format multiple json files in a directory in Python

I am trying to read and format multiple json files in a directory using Python. I have created a function load_json_to_dataframe to load and format the json data into a pandas dataframe, and another ...
Héctor Garrido's user avatar
0 votes
1 answer
105 views

How to rename the latest csv based on the date column value then move it to different directory in python

I am able to managed to download a file from a client's website but since i am using selenium it seems its does have the functionality to change or rename file name before downloading it to the folder ...
user20432746's user avatar
0 votes
0 answers
28 views

I need to put several tab delimited files onto one graph Python [duplicate]

I have several files in a directory and I need to have them displayed in one graph. i have this code currently import os import matplotlib.pyplot as plt import pandas as pd directory = '/Users/jake/...
Jacob Bracken's user avatar
1 vote
2 answers
210 views

Import csv files based on condition from the folders that inside another folder

I would like to copy and paste csv files based on conditions from folders inside another folder. The main folder's name is “main”, and there are folders inside it, namely main_1, main_2, main_3,......,...
helloworld's user avatar
0 votes
2 answers
71 views

How would I set the name of a csv as column in dataframe

I have 300 time series CSV's that do not contain IDs within them contained in a file called all_dataframes, and I am trying to go about adding a the name of the CSV as a column 'name' For example, df1....
jd_h2003's user avatar
  • 314
1 vote
1 answer
155 views

Manipulating Dataframes in different sub directories

I have many subdirecotries in which I have unique datasets. I want to do some manipulations on this df individually. Something like: Access to each subdirectory, do manipulation, go to next directory ...
Avto Abashishvili's user avatar
0 votes
1 answer
211 views

ParseError while trying to grab tickers

I am trying to get my program to run. All the packages I am using are up to date. I am expecting the program to print stock tickers that I have chosen. However, I am getting a lot of errors I can't ...
Anthony's user avatar
  • 21
0 votes
1 answer
402 views

How to rename multiple .Json files within a subfolder using python and pandas

I am having difficulty trying to rename Json files within a ton of subfolders. What I want to do is to replace json files with a count variable. Since, each and every one of the .json files end with ...
sampathgonnuru's user avatar
0 votes
1 answer
69 views

Importing multiple exce files including sheets into 1 excel file

I have 5 Excel files, each file contains 8 sheets, each sheet contains around 30 rows. So this means 1 file has in total 30 x 8 = 240 rows. Is there a speedy trick I can use to combine all these 5 ...
Premier12's user avatar
2 votes
3 answers
2k views

Is my error due to an absolute path issue?

I am trying to create a variable that stores a folder within the directory I am working in called TimeSeries. After that, I am trying to read each file in TimeSeries. Apparently, my error stems from ...
Luck Box's user avatar
0 votes
1 answer
46 views

Python code swaps csv columns when used 3 times in the row ( 3 consecutive days)

Received a huge help in figuring out the code for web-scraping particular website with tender opportunities ( for college project). Decided to apply this code for other data but ran into a problem. On ...
Greg's user avatar
  • 21
1 vote
2 answers
58 views

Using Pandas to Rename Files - Truth of the Value Error

I am trying to write a program that allows me rename files with an excel spreadsheet and I keep getting to the same error message. I really appreciate any help. The error is: ValueError: The truth ...
Scott Ferrier's user avatar
0 votes
1 answer
101 views

Finding the exact directory of the file in Python

Have a Pandas dataframe with the list of file names: Files 3003.txt 3000.txt Also having three directories in which I'd like to make search for these files: dirnames=[ '/Users/User/Desktop/base/...
Keithx's user avatar
  • 3,158
0 votes
1 answer
2k views

Appending the results of for loop with if statement to Pandas Dataframe in Python

I'm making a script in Python for searching for the selected term (word/couple words, sentence) in a bunch of .txt files in a selected folder with printing out the names of the .txt files which ...
Keithx's user avatar
  • 3,158
3 votes
2 answers
7k views

Pandas Vectorize Instead of Loop

I have a dataframe of paths. The task is to get the last modification time for the folder using something like datetime.fromtimestamp(os.path.getmtime('PATH_HERE')) into a separate column import ...
MattR's user avatar
  • 5,156

15 30 50 per page