write code to extract 10 numerical features for each feedstock. make it as comprehensive as possible. Here is an example code for inspiration:

# Import necessary libraries
import pandas as pd
import numpy as np
import gensim.downloader as api
from sklearn.decomposition import PCA

# Step 1: Load the Feedstock Data from the Excel File
# Update the file_path with the actual path to your Excel file
file_path = 'Prices.xlsx'  # Update with your file path

# Load data from the 'Feedstocks' sheet
feedstocks_df = pd.read_excel(file_path, sheet_name='Feedstocks', header=None)

# Splitting data columns using a special character as a delimiter
# The delimiter used is a special space character (EM SPACE)
feedstocks_df = feedstocks_df[0].str.split(" ", expand=True)

# Renaming the columns for easier handling
feedstocks_df.columns = ['Feedstock Name', 'Estimated Price per Ton (£)']

# Dropping rows with NaN and cleaning up data further
feedstocks_df = feedstocks_df.dropna()

# Display the first few rows
print("Feedstock Data:")
print(feedstocks_df.head())

# Convert the 'Estimated Price per Ton (£)' column to numeric
feedstocks_df['Estimated Price per Ton (£)'] = pd.to_numeric(feedstocks_df['Estimated Price per Ton (£)'], errors='coerce')

# Step 2: Load Pre-trained Word Embeddings
# This may take some time to download (~1.6 GB)
print("\nLoading pre-trained word embeddings...")
model = api.load('fasttext-wiki-news-subwords-300')

# Step 3: Compute Embeddings for Each Feedstock
def get_feedstock_embedding(feedstock_name, model):
    """
    Compute the embedding for a feedstock name by averaging the embeddings of its constituent words.
    """
    words = feedstock_name.lower().split()
    embeddings = []
    for word in words:
        try:
            embeddings.append(model[word])
        except KeyError:
            # If the word is not in the vocabulary, skip it
            pass
    if embeddings:
        feedstock_embedding = np.mean(embeddings, axis=0)
    else:
        # If all words are out-of-vocabulary, use a zero vector
        feedstock_embedding = np.zeros(model.vector_size)
    return feedstock_embedding

# Compute embeddings for all feedstocks
print("\nComputing embeddings for each feedstock...")
embeddings = []
for name in feedstocks_df['Feedstock Name']:
    embedding = get_feedstock_embedding(name, model)
    embeddings.append(embedding)

# Convert the list of embeddings to a NumPy array
embedding_matrix = np.array(embeddings)

# Step 4: Apply PCA to Reduce Dimensionality
print("\nApplying PCA to reduce dimensionality...")
pca = PCA(n_components=10)
pca_scores = pca.fit_transform(embedding_matrix)

# Step 5: Add the Principal Components to the DataFrame
# Create a DataFrame for the PCs
pcs_df = pd.DataFrame(pca_scores, columns=[f'PC{i+1}' for i in range(10)])

# Concatenate the PCs DataFrame with the original DataFrame
feedstocks_df = pd.concat([feedstocks_df.reset_index(drop=True), pcs_df], axis=1)

# Display the final DataFrame with the principal components
print("\nFinal Data with Principal Components:")
print(feedstocks_df[['Feedstock Name', 'Estimated Price per Ton (£)'] + [f'PC{i+1}' for i in range(10)]].head())

# Save the DataFrame to a CSV file (optional)
feedstocks_df.to_csv('feedstock_with_principal_components.csv', index=False)