Linked Questions

19 votes
1 answer
81k views

How do you print (in the terminal) a subset of columns from a pandas dataframe? I don't want to remove any columns from the dataframe; I just want to see a few columns in the terminal to get an idea ...
daniellemarie's user avatar
21 votes
1 answer
8k views

For a given data frame: UUT testa testb testc testd DateTime 2017-11-21 18:47:29 1.0 1.0 1.0 3.0 2017-11-21 18:47:30 1.0 2.0 1....
user97662's user avatar
  • 980
5 votes
1 answer
22k views

I have a bunch of columns which requires cleaning in Pandas. I've written a function which does that cleaning. I'm not sure how to apply the same function to many columns. Here is what I'm trying: df[...
Hannan's user avatar
  • 1,191
6 votes
1 answer
13k views

I have a dataframe with 25 columns and an array([ 2, 4, 8, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 23], dtype=int64). I want to choose some specific columns from the dataframe whose indices are ...
DevanshuMishra's user avatar
-1 votes
1 answer
2k views

I have df that looks like this: col1 col2 col3 col4 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
RustyShackleford's user avatar
1 vote
2 answers
5k views

I have a dataframe with many columns and one row, and need to get the column headers for every time that a specific value appears. For example: Date c1 col2 col3 col4 col5 ...
anmol's user avatar
  • 95
-3 votes
1 answer
2k views

following is a preview of a marketing dataframe. Complete the code to get desired output id views clicks a 1 1000 300 b 2 1200 800 c 3 800 200 output views clicks a 1000 ...
Ayushi midha's user avatar
1 vote
1 answer
2k views

I want to plot a linear distribution with the following data (Employee, and days for months(1 for January and so on. To get the data into the right form, I transpose it. But I don't know how to access ...
mischi's user avatar
  • 25
1 vote
1 answer
604 views

I have a simple pandas DataFrame instance defined as follows: import pandas as pd timestamps = [1, 2, 3] is_events_1 = [False, True, True] is_events_2 = [True, False, True] is_censored = [False, True,...
ajrlewis's user avatar
  • 3,068
1 vote
1 answer
518 views

I got this huge csv with backlog data. I want to take some columns from it and add them to another DataFrame. Looks like this: Backlog = r'C:\Users\Desktop\personalized reports\Backlog Case\...
currentlyunknown's user avatar
0 votes
0 answers
356 views

I have a spreadsheet with hundreds of variables, that I need to visualize. To do so I'm using df.melt() to convert the dataset to long format. Which is working well to visualize all the variables in ...
John Conor's user avatar
2 votes
2 answers
218 views

I have a dataframe with 15 separate ICD columns(ICD1 to ICD15) and want to create a variable "Encep" (0/1), when the digits "323" appear in any of the 15 ICD columns. The dataframe itself contains ...
Raven's user avatar
  • 859
0 votes
0 answers
235 views

I have a datframe,df 2.3.6 16.3.9 9.2.7 43.5.2 4.5.6 45.2.1 August 2 1 8 3 10 3 September 7 0 7 3 ...
Bode 's user avatar
  • 529
1 vote
1 answer
214 views

I have a dataframe, df with columns headers A, B , C, D can I reference these headers from this dictionary? dic={'key1':['A','B'], key2: [C,D]} df[key1[0]] giving the output of just column A? A ...
fred.schwartz's user avatar
0 votes
0 answers
171 views

My problem is as follows. Using the pd.ExcelFile methodology I've figured out how to read and parse the relevant Excel files and Sheets that I want to compare. However, while both have similar data in ...
A. Blackmagic's user avatar

15 30 50 per page
1
2 3 4 5