Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can any one help to change a data.txt format, use Python for example, data.txt file like this: .I 1 .T experimental investigation of the aerodynamics

Can any one help to change a data.txt format, use Python

for example, data.txt file like this:

.I 1 .T experimental investigation of the aerodynamics of a wing in a slipstream . .A brenckman,m. .B j. ae. scs. 25, 1958, 324. .W experimental investigation of the aerodynamics of a wing in a slipstream .

.I 2 .T simple shear flow past a flat plate in an incompressible fluid of small viscosity

.I 3 .T the boundary layer in simple shear flow past a flat plate . .A m. b. glauert .B ----------------------------------------

all lines after .I 1 and before .I 2 will be assign 1, all lines after .I 2 before .I 3 will be assign 2, will be :

1 .T 1 experimental investigation of the aerodynamics of a 1 wing in a slipstream . 1 .A 1 brenckman,m. 1 .B 1 j. ae. scs. 25, 1958, 324. 1 .W 1 experimental investigation of the aerodynamics of a 1 wing in a slipstream .

2 simple shear flow past a flat plate in an incompressible fluid of small 2 viscosity 3 .T 3 the boundary layer in simple shear flow past a flat plate . 3 .A 3 m. b. glauert 3 .B

_____________

Use the regular expressions to find the contents between patterns like '.I [0-9]+ .W ' and then go through it and assign ID to each one, OR use pandas dataframe as well to work with it as csv.

Please post step by step here. Thank you!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions