All Questions
3,518
questions
-1
votes
0
answers
44
views
How to split a info in a single row in excel into columns using python [duplicate]
I have read a CSV file using pd.read_csv()
I am trying to clean up this data but it is proving a bit difficult.
Essentially all of the information is in a single column and row 1 and I need to split ...
-1
votes
0
answers
25
views
NameError Traceback (most recent call last) <ipython-input-3-9ec55f7a7976> in <module> : NameError: name 'books' is not defined
I am trying to plot the evolution of degree centrality over the books for some of the characters from Game of Thrones .I have a list evol that contains the computed degree centrality from all the ...
0
votes
2
answers
48
views
Ignoring text at the start of a CSV file
I'm trying to download a CSV file from the web. However, the first 20 lines are column definitions with the data starting at line 24 (the lines in between are blank).
The code I have is:
data = pd....
3
votes
1
answer
86
views
How to compare rows within the same csv file faster
I have a csv file containing 720,000 rows with and 10 columns, the columns that are relevant to the problem are ['timestamp_utc', 'looted_by__name', 'item_id', 'quantity']
This File is logs of items ...
1
vote
1
answer
31
views
Reading .csv column with decimal commas and trailing percentage signs as floats using Pandas
I am faced with reading a .csv file with some columns like this:
Data1 [-]; Data2 [%]
9,46;94,2%
9,45;94,1%
9,42;93,8%
I want to read Data1 [%] column as a pandas DataFrame with values [94.2, 93.4, ...
0
votes
0
answers
21
views
How Can I Load CSV File in PySpark by Matching Column Names with the Schema?
I am loading multiple CSV files using Python Spark. Below is the code:
spark.read.format("csv").option("header", 'true').schema(table_schema).load(file_path)
In this code, I am ...
0
votes
0
answers
83
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
2
answers
73
views
Compare 2 csv based on key column with different rows and columns using Pandas dataframe
I have two different CSV files - old.csv and new.csv. they are with a different number of rows and columns. the CSV files can include numbers, strings, chars, and special characters. For example:
old....
0
votes
0
answers
25
views
Using klib to analyze a dataset csv file
I have my dataset as a csv file on my desktop. I launched a jupyter notebook and now i want to read my csv file in jupyter and i can´t figure out how to do that. I typed in:
import panda as pd
dataset ...
1
vote
1
answer
48
views
Uploading certain columns of multiple CSV files in R and putting them into a data frame
So I'm having trouble working this out. I have multiple CSV files with the same two columns: Wavenumber and Intensity. The Wavenumber column for each file is the exact same, so I don't really care ...
3
votes
4
answers
131
views
How to read multiple CSV files and put them into separate Pandas dataframes?
I am trying to loop over a directory with multiple CSV files and read them into (separate) pandas dataframes.
I have tried several methods but I cannot manage to do so. However I did manage to read ...
4
votes
2
answers
166
views
Checking for Blank Values in Specific Columns with Conditional Exceptions in pandas
Question 1: How do I check for empty values given additional conditions?
I have a CSV file containing 100 columns. Out of these, I want to check for blank values in the following columns:
bank and ...
0
votes
1
answer
125
views
Write CSV-like text response from Python request to PySpark Dataframe
I'm working in a Microsoft Fabric notebook, which uses PySpark. The API response has header 'Content-Type' = 'text/csv'. From what I see, the response.text seems to be similar to '"ColA",&...
0
votes
1
answer
50
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)
...
1
vote
0
answers
23
views
How to search for matching values from a dataframe to a different dataframe containing semicolon-delimited data?
I have two dataframes with all data as text/string.
df1 with data as:
and df2 with data as :
I would like to highlight the matching values in yellow and render df2 as an html with the highlighted ...