All Questions
1,129 questions
0
votes
0
answers
53
views
How do I convert Excel to CSV, but preserve the dates using Python? [duplicate]
I have some code that creates csv files from an xlsx file, however, all dates are coming in the csv file as a float. This is a problem when I have more than one date in a column. Anyone know how to ...
0
votes
1
answer
160
views
Pandas read_excel() not reading all columns
I'm using Python 3.12.6 and pandas==2.2.3.
This is a simple code, that I've always used and always worked to read the first sheet of an excel file:
df = pd.read_excel(file_path, engine='openpyxl', ...
0
votes
1
answer
78
views
Reading an irregular column CSV file using Pandas causes errors
I have a csv file,
"==CNAME=="
""
"Tool Name","v2.1"
"Name:","MATT B"
"E-Mail:","[email protected]"
"Phone Number:&...
0
votes
1
answer
65
views
How to read from csv and generate excel file with same name python
Currently i am reading sql queries from column in csv file, executing them in Snowflake and then generating sql query result in separate excel file for every query. The code is working fine.
The excel ...
-1
votes
2
answers
128
views
Read excel with same column names with pandas
I am trying to convert an excel to csv. The excel has the following headers -
DATE,FIELD1,FEEDER BRANCH,50,100,200,500,1000,2000,FIELD2,50,100,200,500,1000,2000,FIELD3,50,100,200,500,1000,2000
As ...
1
vote
1
answer
89
views
How to prevent scientific notation when exporting a pandas dataframe to csv?
I read and modify excel files with pandas and export them as csv at the end.
One column can contain all kinds of text and sometimes a numeric string like "0123456789", note the leading zero. ...
1
vote
0
answers
73
views
read a csv and then read an excel spreadsheet then compare the description in csv and see if it exists as a column heading using python
This is my first program in my project.
I want to read the .csv and compare to an excel spreadsheet.
If it doesn't exist then create it.
If it exists then compare against it.
To create then field 1 is ...
0
votes
1
answer
102
views
Is there a way to choose which cell/column of a CSV to upload a dataframe into, just like scraping data onto an excel file?
I have had experience with webscraping data onto excel files, and I know that when copying data down into an excel spreadsheet, you can choose which column to copy it into. (startcol = 10 as shown in ...
0
votes
1
answer
35
views
Columns of Data missing on Google Sheet file after upload
I have this program that is supposed to take some csv files using pandas and convert them to google sheet files and upload them to my Google Drive folder. However, when uploaded, only the last 8 ...
0
votes
1
answer
466
views
How can I combine multiple CSV files into one Excel worksheet using Python?
I am trying to combine multiple CSV files into an Excel worksheet so I can analyse my data.
So far I have been able to create the worksheet with the names of the CSV files as the tabs, but in the ...
0
votes
0
answers
97
views
How to keep data frame data types when exporting to CSV file? [duplicate]
I have a pandas data frame with int64 , string[python] , and float64 data types. How do I preserve those data types when exporting pandas DataFrame.to_csv option?
I need the exported Excel file to be ...
0
votes
1
answer
74
views
How to copy all the data from a CSV (starting from row 1) over to an existing Excel file?
My script copies data from a CSV file located in a local folder over to a file located in a shared drive folder. The problem I am having is that the CSV does not have headers, it is all data which ...
0
votes
1
answer
54
views
How can I achieve the desired output shown in the provided image?
Here, my code:
#distance of pose
if results.pose_landmarks:
for pose in poses:
landmark_attribute = getattr(mp_pose.PoseLandmark, pose)
...
0
votes
2
answers
76
views
Can we combine lines 0-32 into a single row with keypoints, adding timestamps divisible by 33 (number of keypoints)?
Here the my output from my code
code's output
There is a 33 keypoint, which consists of
body_pose = ['NOSE', 'LEFT_EYE_INNER', 'LEFT_EYE', 'LEFT_EYE_OUTER', 'RIGHT_EYE_INNER', 'RIGHT_EYE', '...
-1
votes
1
answer
33
views
CSV file shows empty line or patial of content
I wrote a python file to collect some server certificate info and save in a csv file.
Everything works fine except the display when open the csv file.
As you can see the Cert Name field is either ...