data-analysis

Pandas – Irregular time series data – Compare row to next 8 hours of rows

Pandas – Irregular time series data – Compare row to next 8 hours of rows Question: Right now I am using pandas to analyze call center data. The data is structured as followed: call_time = pd.to_datetime([ ‘2020-01-01 01:00:00’, ‘2020-01-01 09:00:00’, ‘2020-01-01 01:00:00’, ‘2020-01-01 03:00:00’, ‘2020-01-01 04:00:00’, ‘2020-01-01 06:00:00’, ‘2020-01-01 01:00:00’, ‘2020-01-01 10:00:00’, ]) df = …

Total answers: 2

Convert comma to dot in notepad (Not every comma)

Convert comma to dot in notepad (Not every comma) Question: I have a data which looks like 5,960464,6,65430376927058E-10,-91,7689743041992,-89,5235061645508,6,71407200919707E-05,0,00869479635485696 11,92093,5,23110578457515E-10,-92,8140640258789,-90,5685958862305,8,97218165598724E-05,0,011619072933792 17,88139,4,52214777469635E-10,-93,4465560913086,-91,2010803222656,0,000104674258706842,0,0135554304720727 23,84186,4,29985026518504E-10,-93,6654663085938,-91,4199981689453,0,00011655840052398,0,0150944397768688 29,80232,5,20411183436712E-10,-92,8365325927734,-90,591064453125,0,000128133766655091,0,0165934622941289 This data has actually 6 columns. Comma used to separate the data as well as used for floating numbers. I need to convert above data to the following for further processing. x, y1, …

Total answers: 1

I want to connect to an api and extract the data

I want to connect to an api and extract the data Question: I’m doing my own python analytics project on compiling and analysing data from this open-data source: (https://data.gov.ie/dataset?q=homeless&api=true&sort=score+desc%2C+metadata_created+desc&theme=Housing) I’ve never worked with api’s or json’s before.. all the info on google or YouTube video’s always have an API key.. but I don’t know how …

Total answers: 2

Apply name-entity recognition on specific dataframe columns with Polars

Apply name-entity recognition on specific dataframe columns with Polars Question: I would like to apply a specific function to specific columns using polars similar to the following question: Apply name-entity recognition on specific dataframe columns Above question works with pandas and it is taking ages for me to run it on my computer. So, I …

Total answers: 3

How do i select cells in a column that contain date type values in pandas

How do i select cells in a column that contain date type values in pandas Question: I want to look up the row that contains Transitioning EIN in the Unnamed 17 column and the date of 2021-01-29 in Unnamed 13 column. pic I tried this: df.loc[(df[‘Unnamed: 17′]==’Transitioning EIN’) & (df[‘Unnamed: 13’]=="2021-01-29 00:00:00")] which returns an …

Total answers: 1

Ordering data in python or excel

Ordering data in python or excel Question: I have a large csv file of unordered data. It consists of music tags. I am trying to group all of the similar tags together for easier analysis. An example of what I have: Band1, hiphop, pop, rap Band2, rock, rap, pop band3, hiphop, rap The output I …

Total answers: 3

I want to create a new frequency column for each column in a pandas dataframe

I want to create a new frequency column for each column in a pandas dataframe Question: Let’s say I have a dataframe like this: colors animals yellow cat yellow cat red cat red cat blue cat I want to create a column for each column showing the frequency in which each value happens: colors colors_frequency …

Total answers: 2