All Questions
281
questions
1
vote
1
answer
43
views
Convert TSV file data to a dataframe, which can be pushed to database
We have TSV files which holds IOT data, want to convert to table like structure using pandas. I have worked on TSV data, similar to given below, were the logics goes like
read the file
Add new column ...
0
votes
1
answer
60
views
Python code unable to save to existing folder
I've been writing some code that takes a series of Excel files as an input, and then saves a dataframe to an excel as an output. Both the input and output folders sit on a network drive, where
...
0
votes
0
answers
41
views
How to read a txt file in pandas where head fields are in lines? [duplicate]
I have a txt file like below, where some data have the ":" as value, and between each record there is two blank lines
Serial# : 356899
LDEV : 0
SL : 0
CL : 0
VOL_TYPE : OPEN-V-CVS
...
1
vote
1
answer
37
views
Problems with flask when uploading a file and opening with panda
I have a simple flask app. I need to upload a excel file, do some work with it and then save the file on disk. For this purpouse i have this code.
app = Flask(__name__)
FILE_PATH = 'files'
app....
0
votes
5
answers
94
views
How can i list excel files within a folder with different possible extentions (.xlsx, .xlsb, .xlsm) using python
I want my code to display all the excel files in my folder which may have different extentions.
I tried following but it didnt help
os.chdir(path)
for filename in os.listdir(os.getcwd()):
if ...
0
votes
2
answers
33
views
How can I fix this File Error in my Program
I found this error while coding:
FileNotFoundError: [Errno 2] No such file or directory: 'us_baby_names'
please how can I fix this?
Us_baby_names is the name of my dataset file.
I have tried moving ...
0
votes
0
answers
56
views
Dask dataframes: read_excel file by file with panda
I'm processing multiple different types of files in different sizes with different columns. Files aren't too big (max 5MB and 20-30k rows) but panda was struggling with so decided to rewrite it with ...
1
vote
2
answers
80
views
Split different data (separated by a blank line) from a file in different lists in python
Python newbie here, I have a file which contains different physical experiment, divided by a blank line, as:
#t x
0 0
0 1
0 2
0 1
0 2
0 3
i would like to know if there is an easy way to split my ...
-2
votes
1
answer
384
views
Reading a CAN .asc file and plot specific data from it
I am quite new to this datascience and python stuff i have a code that looks fine at first sight and also runs without problems but it doesnt give me the outcome i expect. the data i want in my tables ...
0
votes
0
answers
20
views
Pandas DataFrame not updating CSV: append() vs .loc and function file placement
I've encountered a peculiar issue with pandas and how it behaves when updating DataFrames based on the method used (append() vs .loc) and where functions are placed (in the same file vs separate files)...
0
votes
2
answers
81
views
which variable do I use to write the data to csv file
how would I adjust my code so that I can print the debit and credit to a csv file please.
I've included the code below and am having trouble making sense of what variables to use and where, with the ...
0
votes
1
answer
34
views
Execute a python prog that read a list of argument file
My prog extract a text file from an URL.
In the URL needs, there is a pattern of 5 letters, a user and a password. The rest is totally the same on almost 120 URL.
import pandas as pd
sta = 'router1'
...
0
votes
0
answers
37
views
Input file turns wrong when put in a function [duplicate]
I am currently trying to use pandas to read what is basically a csv file (but officially .dat format) and plot the data inside.
def IofQ(folderout) :
Iofq = pd.read_csv("{}\Iofq.dat"....
5
votes
5
answers
990
views
Faster way to split a large CSV file evenly by Groups into smaller CSV files?
I'm sure there is a better way for this but I am drawing a blank. I have a CSV file in this format. The ID column is sorted so everything is grouped together at least:
Text ID
this is ...
0
votes
1
answer
38
views
How to skip adding newline in data frame?
I have the code below to merge 2 dataframs columns in one dataframe :
where the first one contains predicted text
And for the other part contains ground truth value
import pandas as pd
from google....