There are several types of No.Fy Arrays and sequences of Arrays
by appending to another listRead one number array to save the sequence.
Read the next number array again and save the sequence again
When you want to label a list of thousands of elements
Here, one number array sequence has the same label value.
I wonder if there is a good way.
numpy label
Is it roughly the same situation as below? Please refer to it.
import numpy as np
import pandas as pd
np.random.seed(1)
def read_dogs():
return np.random.rand(100, 4)
def read_cats():
return np.random.rand(50, 4)
dog data = read_dogs()
Cat data = read_cats()
dog data frame = pd.DataFrame (dog data, columns = "height, weight, forefoot length, tail length").split(","))
dog data frame ["type"] = "dog"
Cat data frame = pd.DataFrame (cat data, columns = "height, weight, forefoot length, tail length").split(","))
Cat Data Frame ["Type"] = "Cat"
Dog Cat Data Frame = pd.concat ([dog data frame, cat data frame], axis=0, ignore_index=True)
print (Dog Cat Data Frame.sample(5).to_markdown())
567 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
572 Understanding How to Configure Google API Key
599 GDB gets version error when attempting to debug with the Presense SDK (IDE)
577 PHP ssh2_scp_send fails to send files as intended
886 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.