Transformation and structuring of Excel file in Python - python

I ask you to help with the solution of the problem.
I recently started learning Python, and I don't have enough experience to solve it yet.
It is necessary to write a python script that transforms an Excel spreadsheet into a flat view for further work and analytics.
Source table: input ex.xlsx
Example of expected result: out ex.xlsx
I will be very grateful for help!
enter image description here
enter image description here

Consider to find out more about pandas dataframe. We can then use pd.read_excel() and pd.read_csv() to read the data into memory and process the data using pandas.

Related

Finding data to work on pandas for data analysis with Python

I am trying to learn data analysis with Python and working with Pandas. Is there anyone to help me to find open data two work on. I will try to use data for data analysis with python on google colab. So I need csv files to work on it. I would be happy ıf you can direct me abour it
you can get datasets for your ML/AI projects at https://www.kaggle.com/.
you will have to create an account first.

How to parse a binary file in python

I am still new to the python when it comes to parsing data. I'd like solve this problem that can be seen in the image and the respective "telemetry.bin" and 'TLM_LIST.csv" are in the google drive folder. I am able to operate the csv file using pandas but don't how to deal with the bin file as it throws output like below:
https://drive.google.com/open?id=1h_15khW2abjT8V6L38VSrqpb5vrmDfa-
b'\n\x00\x00\x07\x08\x01\x0b\xe7\x08\xc3\x0b\xd9\x07\x9e\x04\xe4\x00\x00\x0c\xef\x00\x99\x1f\xdb\x00\x00\x00\x00\xbe\xef\xca\xfe\x00\x00\x01\x00\x02\x04\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00mg2878_a A\x00\xc1\x00\x8fe\xb8>\x00\x00\x00\x05\x00%~\x1a\x00\x00\x00\x96\x00\x00\x00\x91\x00\x01\x02\x00\x00\x00\x00\x8fe\xb8?\x00\x00\x00\x00'
enter image description here
Please I really wanna learn so please help.
Thanks in advance.

how to convert a .csv file to .bag in python?

I have some VLP16 LiDar data in .csv file format, have to load the data in Ros Rviz for which I need the Rosbag file(.bag). I have tried finding it in the Ros tutorial, what I got was to convert .bag to .csv
I'm not actually expert in processing .bag files but I think you need to go through your CSV file and manually add the values using rosbag Python API
Not direct answer but check this script in python, which might help you.
Regarding C++ I propose this repository: convert_csv_to_rosbag which is even closer to what you asked.
However, it seems that you need to do it by yourself based on these examples.

Having a trouble with table reading on pandas

I'm really new to programming and I've been trying to emulate the 'pandas.read_table' code from Python for Data Analysis book(the chapter on MovieLens 1M Data Set, pg.23ish). Below is the link to the file used for database and the images of jupyter notebook on which I've typed the codes. As you'll see there, I'm having a trouble with the data values not reading properly as it should, and I can't seem to figure out why. Your help will be much appreciated!
Trouble screen
Database file
If you are reading data from a .csv file, use pd.read_csv.
If you want to use pd.read_table, you have to specify the delimiter as the comma with the argument sep=','. What is happening is that pd.read_table is trying to separate your input information at every ::, but it looks like your data is separated by commas instead.
More information here:
http://pandas.pydata.org/pandas-docs/stable/io.html
https://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_table.html

How to create insights from an excel file using either Python? I'm a beginner in both languages

I have a large Excel spreadsheet which has lots and lots of historical data of an organisation. I want to be able to read that excel file and create valuable insights from it. I don't expect anyone to do this for me, but I'm just hoping someone can pinpoint me as to how should I go about doing this on Python/R or suggest any online resource I can access to get this done.
You should take a look at openpyxl: http://openpyxl.readthedocs.io/en/default/.
It is great library for reading, writing and processing Excel spreadsheet in python. You can easily process the data and take valuable insights from it.

Categories

Resources